Friday, March 23, 2012

how to parse json in javascript

Example :
var json = '{"result":true,"count":1}',
obj = JSON.parse(json);
alert(obj.count);
For the browsers that don't you can implement it using json2.js.

No comments:

Post a Comment