const arrs = [{ a: 1 }, { c: 1 }, { b: 2 }];
function getNewArr (arrs){
let newArr = arrs.map(item=>{
let curKey = Object.keys(item) //Object.keys可以提取出对象中的key值,注意取出的key是数组
return item[curKey[0]]
})
return newArr
}
let newArr = getNewArr(arrs)
console.log(newArr)//[ 1, 1, 2 ]