Monday, April 23, 2012

JQuery: parse json text to json Object


var obj = jQuery.parseJSON('{"name":"John"}');
alert( obj.name === "John" );


Reference:
http://api.jquery.com/jQuery.parseJSON/

No comments: