Friday, 26 August 2011

Jquery JSON data parsing


var JSONData = '{"name":"John", "age":"28"}';

var obj = $.parseJSON(JSONData);
alert(obj.name + " - " + obj.age);

No comments:

Post a Comment