I\'ve generated some JSON and I\'m trying to pull it into an object in JavaScript. I keep getting errors. Here\'s what I have:
var data = \'{\"count\" : 1, \
I guess this is what you want:
var data = '{"count" : 1, "stack" : "sometext\\n\\n"}';
(You need to escape the "\" in your string (turning it into a double-"\"), otherwise it will become a newline in the JSON source, not the JSON data.)