Content stored in my database:
"Recommended cutting conditions"
When using Json_encode in PHP, the result is:
{"table1":[{"Item":{"original_text":"\u63a8\u5968\u5207\u524a\u6761\u4ef6 \b"}}]};
In JavaScript :
var strData ='{"table1":[{"Item":{"original_text":"\u63a8\u5968\u5207\u524a\u6761\u4ef6 \b"}}]}';//getData();
strData=strData.replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t");
var jsonData = JSON.parse(strData)
Error encountered:
Uncaught SyntaxError: Unexpected token in JSON at position 56
at JSON.parse (<anonymous>)
https://i.sstatic.net/xQ901.png How can I parse JSON with special characters?
Thank you all.