es6对象转数组
var obj = { foo: 'bar', baz: 42 }; console.log(Object.keys(obj)) //获取key
console.log(Object.values(obj)) //获取value
本文来自博客园,作者:quitpoison,转载请注明原文链接:https://www.cnblogs.com/quitpoison/p/11341434.html
var obj = { foo: 'bar', baz: 42 }; console.log(Object.keys(obj)) //获取key
console.log(Object.values(obj)) //获取value
本文来自博客园,作者:quitpoison,转载请注明原文链接:https://www.cnblogs.com/quitpoison/p/11341434.html