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]
本文标题:将[object, object]转换为object
本文链接:https://www.haomeiwen.com/subject/qazduxtx.html
网友评论