var person={"first_name":"Tony","last_name":"Hawk","age":31};
var personJSONString=JSON.stringify(person);
// json object
const jsonData = '{ "name": "John", "age": 22 }';
// converting to JavaScript object
const obj = JSON.parse(jsonData);
// accessing the data
console.log(obj.name); // John
var jsonPerson = '{"first_name":"billy", "age":23}';
var personObject = JSON.parse(jsonPerson); //parse json string into JS object
// JavaScript object
const jsonData = { "name": "John", "age": 22 };
// converting to JSON
const obj = JSON.stringify(jsonData);
// accessing the data
console.log(obj); // "{"name":"John","age":22}"
JSON.stringify(the_data);
local storage JSON.parse