Answers for "JSON.stringify with strip slash reactjs"

0

JSON.stringify with strip slash reactjs

var str = '{"2003":{"1":{"2":["test"],"3":["test2"]}}}';
var obj = {"2003":{"1":{"2":["test"],"3":["test2"]}}};

console.log( JSON.stringify(str) );  // {\"2003\":{\"1\":{\"2\":[\"test\"],\"3\":[\"test2\"]}}} 
console.log( JSON.stringify(obj) );  // {"2003":{"1":{"2":["test"],"3":["test2"]}}}
Posted by: Guest on January-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language