change to json string

Solutions on MaxInterview for change to json string by the best coders in the world

showing results for - "change to json string"
Simón
27 Nov 2017
1
2
3  var obj =
4  { name: "John", today: new Date(), city : "New York" };
5
6  var myJSON = JSON.stringify(obj);
7
8  
9document.getElementById("demo").innerHTML = myJSON;