let obj = {'name':jack, 'age':18, 'phone':13211112222};
var arr = []
for (let i in obj) {
let x = {};
x[i] = obj[i];
arr.push(x)
}
console.log(arr);
let obj = {'name':jack, 'age':18, 'phone':13211112222};
var arr = []
for (let i in obj) {
let x = {};
x[i] = obj[i];
arr.push(x)
}
console.log(arr);
转载于:https://www.cnblogs.com/muou2125/p/9431153.html