how to convert array to string json
snippet in javascript

how to convert array to string json

user5837

var arr = [ "John", "Peter", "Sally", "Jane" ];
var myJSON = JSON.stringify(arr);