JSON.parse()
Parses the data and converts it into a JavaScript objectlet txt = '{"name":"John", "age":30, "city":"New York"}'
// Converts JSON string into a JavaScript object.
let obj = JSON.parse(txt);
// Puts the data into "p" element with id: demo
document.getElementById("demo").innerHTML = obj.name + ", " + obj.age;