I have a string and it needs to be passed on as a JSON, but then, inside the string, I cannot have " signs, so I was thinking about replacing them with ' signs in my Javascript.
I tried this:
var myString = myString.replace("\"", "\'");
But unfortunately, it only replaced the first occurrence of " in my string. Help?