Looking to convert a JavaScript object into a string? Here's an example:
var obj = {"name": "XXX", "age": "27"};
After doing some research, I found out about JSON.stringify(obj);
JSON.stringify(obj);
works perfectly when the IE8 modes are set as follows:
Browser Mode : IE8
Documentn Mode: IE8 Standards
However, the same code doesn't work if the settings are different:
Browser Mode : IE8
Documentn Mode: Quirks Mode
It's puzzling why it works in one setting but not the other...
If you have any insights, please share!