I am trying to inject json into my backbone.js app. My json has "
for every quote.
Is there a way for me to remove this?
I've provided a sample below:
[{"Id":1,"Name":"Name}]
It typically looks like a small, dark-colored fleck. It may look like a splinter if it's just the tick's mouthparts. For an additional sign of a tick head still being stuck, you may also inspect the tick's body to see if it looks like pieces of the head broke off.
Clean the area of the tick bite with rubbing alcohol. Using a sterilized tweezer, gently attempt to remove the tick's head with steady, strong pressure as you pull outward. If a sterilized tweezer doesn't work, you may also try to use a needle to widen the area of the tick bite to try to get the head out.
Do not try to kill, smother, or lubricate the tick with oil, alcohol, petroleum jelly, or similar material while the tick is still embedded in the skin.
Presumably you have it in a variable and are using JSON.parse(data);
. In which case, use:
JSON.parse(data.replace(/"/g,'"'));
You might want to fix your JSON-writing script though, because "
is not valid in a JSON object.
Accepted answer is right, however I had a trouble with that. When I add in my code, checking on debugger, I saw that it changes from
result.replace(/"/g,'"')
to
result.replace(/"/g,'"')
Instead of this I use that:
result.replace(/("\;)/g,"\"")
By this notation it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With