convert list to json in javascript code example
Example 1: how to convert array to string json
var arr = [ "John", "Peter", "Sally", "Jane" ];
var myJSON = JSON.stringify(arr);
Example 2: js create json from object
JSON.stringify(the_data);
var arr = [ "John", "Peter", "Sally", "Jane" ];
var myJSON = JSON.stringify(arr);
JSON.stringify(the_data);