try the following:
mystring = mystring.replace(/""/g, '"');
The regular expression captures two double quotes and replaces them with one. We use regex to replace more than one match (replacing JavaScript will replace only the first).
Note that the second argument to replace is the string. To represent " in a string, we need to avoid it: "\"" or use one line of quotation marks: '"' . JavaScript supports both.
source share