how to stringify json in js
snippet in javascript

how to stringify json in js

user2299

var obj = { name: "John", age: 30, city: "New York" };
var myJSON = JSON.stringify(obj);

how to use json stringify in javascript

user6703

var Num=[1,2,3,4,5,6]
console.log("The Numbers Are "+JSON.stringify(Num))
//output= The Number Are [1,2,3,4,5,6]