Deserializing JSON text into the JavaScript object

Prabhukiran345
Posted by Prabhukiran345 under JavaScript category on | Points: 40 | Views : 1200
We Can Achieve this by using JSON.parse() .JSON.parse() is a function that filters and transforms the results .

EXAMPLE:
var json = '{ "firstName":"Prabhu", "lastName":"Kiran", "FundaCode":345 }';

var student = JSON.parse(json);
alert(student.firstName + " " + student.lastName); // => Prabhu Kiran

Comments or Responses

Login to post response