获取json对象的键数组和值数组
程序员文章站
2022-05-04 12:35:20
const obj = {a: 1, b: 2, c: 3}; Object.values(obj);//[1, 2, 3] Object.keys(obj);//["a", "b", "c"] ......
const obj = {a: 1, b: 2, c: 3}; object.values(obj);//[1, 2, 3] object.keys(obj);//["a", "b", "c"]