how to turn javascript object into json code example
Example: how to convert normal object to json object in javascript
var obj = { name: "John", age: 30, city: "New York" };
var myJSON =
JSON.stringify(obj);
document.getElementById("demo").innerHTML = myJSON;