var jsonString = '{"htmluserresponse":"This is my firs \n test"}';
var jsonObj = JSON.parse(jsonString);
console.log("Test Response------" + jsonObj.htmluserresponse);
JSON.stringify()
actually created the string i pass into the jsonString, but JSON.parse
fails if the string has \n
character.
how to get the valid string ?