Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Remove the escaping of string while JSON.decode calling in developers toolbar.

  • 1 reply
  • 1 has this problem
  • 17 views
  • Last reply by cor-el

more options

Remove the escape string in the return string.

Remove the escape string in the return string.
Attached screenshots

Modified by httpsOmkar

All Replies (1)

more options

That is not possible in this case because the result shown in the Web Console is enclosed in quotation marks and quotes (") in the string need to be escaped. You would have to use a method that doesn't enclose like a prompt or alert to be able to see an unescaped string. When specifying the string you can use single quotes to avoid having to escape the quotes.

alert(JSON.stringify(JSON.parse('{"test":"test"}')));
alert(JSON.stringify(JSON.parse("{\"test\":\"test\"}")));