Thursday, July 4, 2013

Json String To Javascript Object

var jsonText = '{ "Names": "Chill", "CarNo": [ 1, 2, 3 ]}'
var your_object = JSON.parse(jsonText);
//will produce the object where you can use dot operator
alert(your_object.Names) // will alert Chill

No comments:

Post a Comment