将[object, object]转换为object
2017-10-17 本文已影响5人
danihay
1.const data = obj;原状
console.log(data) // [object, object]
- const data = JSON.stringify(obj);
console.log(data) // "{a:1,b:2}" - console.log(JSON.parse(data)) // {a:1,b:2}
1.const data = obj;原状
console.log(data) // [object, object]