JSON 可以用 .push() 添加新数据
var json =[ { title:"1",content:"Tom" }, { title:"2",content:"Jack" } ]; json.push({ "title":"3","content":"CC"}); console.log(json); // 输出 [Object, Object, Object]
JSON 转字符串
JSON.stringify(json)
字符串转 JSON
JSON.parse(String);