1var person={"first_name":"Tony","last_name":"Hawk","age":31};
2var personJSONString=JSON.stringify(person);
1
2
3 var obj = { name: "John", age: 30, city: "New York" };
4var myJSON =
5 JSON.stringify(obj);
6document.getElementById("demo").innerHTML = myJSON;