After making an AJAX call, I have received a string in JSon format:
{status:OK,addresses:[0,1,2,3,4,5]}
In order to convert it into a JSon object, I tried using the following line of code:
var jsonObj = eval(jsonString);
However, this resulted in an exception being thrown without any message available for reference. I also attempted using a different JSon format:
{"status":"OK","addresses":[0,1,2,3,4,5]}
Unfortunately, another exception was thrown, stating that an unexpected character '&' had been found.
The JSon data is coming from an action in Struts2 framework.
If anyone can provide assistance with this issue, it would be greatly appreciated. Thank you