I am rendering string javascript variable init statements at server side (using ASP MVC, but I do not think it matters) The string variable content is a valid JSON at server side, and encoded when rendered to html. My rendered statement looks like this:
var myvariable = '{"prefix":"","name":"Grid&...
Quatation marks and other special chars in the string were encoded to html entities, which is completely OK, unless this encoding the variable declaration would by syntactically incorrect.
However I must get back the original string content at client side which was a correct JSON at server side. How can I accomplish this with javascript or jQuery? (Please note, then I do know how to get a javascript object from JSON, I am not asking for that)