How to escape double quote in JSON string
Posted: 06 Dec 2020, 06:52
I am trying to parse a JSON string 'Hello " test' containing double quote which already escaped.
But I get error:
Is there anything I missed here?
Code: Select all
JSON.parse('{"x":"Hello \" test "}')
Code: Select all
Uncaught SyntaxError: Unespected Tocken t in JSON