Answers for "change to json string"

0

change to json string

var obj =
  { name: "John", today: new Date(), city : "New York" };

  var myJSON = JSON.stringify(obj);

  
document.getElementById("demo").innerHTML = myJSON;
Posted by: Guest on May-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language