json转数组取key和value
let obj = res.data.data.age;
var arr = [];
var arr1 = [];
for (let i in obj) {
arr.push(obj[i]); //属性
arr1.push(i); //key
}
console.log(arr);
console.log(arr1);