I'm sending some html via jQuery, and in this html are various values that need to be quoted, and in one instance, there's a nested value, so I have to be able to send both kinds of quotes. Here's some mock code:
var myVar = "<tag value='foo' value2="config={'bar':null, 'foo2':true}" />";
How can in ensure that the double quotes are sent properly?