Showing posts from April, 2014

Converting JSON string to JavaScript object

Javascript has an inbuilt library object to handle json data.

In order to convert a json string to an object, you can use the following method call:
var obj = JSON.parse("jsonString")  for the other way around :
var jsonString = JSON.stringify(obj);
Check out the site It's very useful to format json strings.