New Page Example

JSON Parse and Stringify

Parse

Use


var jsonObj = {
	people : []
};
var string = JSON.stringify(jsonObj);
var newObj = JSON.parse(string);
newObj.person[i]["firstName"];
				

Example

First Name Last Name Age

Stringify

Use


var jsonObj = {
	people : []
};
var string = JSON.stringify(jsonObj);
document.getElementById("hiddenInput").value = string;
				

Example

Update the Json object here

First Name Last Name Age