慕桂英546537
var arr = [{ "aaa": { "name": "小敏", "price": "18", "count": 2, "num": 5 }, "bbb": { "name": "小李", "price": "18", "count": 1, "num": 11 }, "ccc": { "name": "小华", "price": "18", "count": 1, "num": 18 }}];var tArr = [];arr.forEach((item,index)=>{ tArr.push( Object.keys(item).map((v,i)=>{ return { id : v, count : item[v].count } }) );});console.log(tArr);