json decoder jquery code example
Example 1: json_decode jquery
var obj = jQuery.parseJSON( '{ "name": "John" }' );
alert( obj.name === "John" );
Example 2: js string to json
var obj = JSON.parse("{no:'u',my:'sql'}");//returnes {no:'u',my:'sql'}
var obj = jQuery.parseJSON( '{ "name": "John" }' );
alert( obj.name === "John" );
var obj = JSON.parse("{no:'u',my:'sql'}");//returnes {no:'u',my:'sql'}