JSON.stringify() 把 JavaScript 对象转换为字符串。
let list = [];
list['a'] = ['1','2','3','4'];
alert(JSON.stringify(list));
//结果为:[]let list = {};
list['a'] = ['a','b','c','d'];
alert(JSON.stringify(list));
//结果为:{a:["a","b","c","d"]}
JSON.stringify() 把 JavaScript 对象转换为字符串。
let list = [];
list['a'] = ['1','2','3','4'];
alert(JSON.stringify(list));
//结果为:[]let list = {};
list['a'] = ['a','b','c','d'];
alert(JSON.stringify(list));
//结果为:{a:["a","b","c","d"]}