JSON.stringify( arr )
//json字符串转数组var jsonStr = '[1,2,3,{"a":1}]'
JSON.parse( jsonStr )
var arr = ['1600', '2000', '0', '-6000','-8000']var obj = {data:arr}
console.log(obj)
或者:
var arr = ['1600', '2000', '0', '-6000','-8000']
var obj = {}
obj.data = arr
console.log(obj)