let data = [{className: '13班级',sore: '88'},{className: '10班级',sore: '11'}, {className: '19班级',sore: '22'}];
let obj = {};
let scoreData = data.map((item,index) => {
return obj["className"+index] = item.sore
})
console.log(obj);/// {className0: "88" ,className1: "11",className2: "22"},
网友评论