How to remove " from my Json in Vuejs ? | How to remove double quotes from a String


How to remove " from my Json in Vuejs ?  | How to remove double quotes from a String


solution in vuejs use replace option


 .replace(/"/g,'"')

.replace(/'/g,"'")

.replace(/"/g,'"').replace(/'/g,"'") :


title: data.title ?stripTags(this.getHtml(data.title)).replace(/"/g,'"').replace(/'/g,"'") : "",

setPageData(response) {

      const data = this.getData(response[0]);

      this.post = {

        title: data.title ? stripTags(this.getHtml(data.title)).replace(/"/g,'"').replace(/'/g,"'") : "",

        content: data.content ? this.getHtml(data.content) : "",

        date: data.date

      };

    }

  }

Post a Comment

Previous Post Next Post