Adam92 Adam92 - 1 year ago 69
JSON Question

Deserialising JSON Data

I've an example string being return through a post call to an ASP handler.

alert("Data: " + data);

Is working and alerting the string.


I cant seem to be able to access the data in Item1 and Item2 so I can enter it into a textbox?


Answer Source

You should first parse that string to JSON like this:

var jsonified = JSON.parse(data);

then you can access its elements like this:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download