I have an Array var cars = [2,3,..] which holds a few integers. I\'ve added a few values to the array, but I now need to send this array to a page via jQuery\'s
var cars = [2,3,..]
One other way could be this:
var json_arr = {}; json_arr["name1"] = "value1"; json_arr["name2"] = "value2"; json_arr["name3"] = "value3"; var json_string = JSON.stringify(json_arr);