How do I disable auto string escape in Firefox's developer console?

Viewed 454

Coming from Chrome, I'm used to the following producing a non escaped string in the developer JS console:

> JSON.stringify(JSON.parse('{"a": 10}'))
{"a":10}

​However, in Firefox, it produces the following:

> JSON.stringify(JSON.parse('{"a": 10}'))
"{\"a\":10}"   <-- notice that the quote has been escaped as \", which is correct, but not what I want

​How can I instruct Firefox to stop escaping the strings printed in the JS console?

1 Answers

You can simply use console.log() like this:

> console.log(JSON.stringify(JSON.parse('{"a":10}')))
{"a":10}

Cheers!

Related