要处理的数组 arr = [ {guid: "BMID0152", name: "北京研发中心", percentage: "1"}, {guid: "BMID0154", name: "北京一部研发中心", percentage: "2"}, {guid: "BMID0155", name: "北京二部研发中心", percentage: "3"}, {guid: "BMID0152", name: "北京研发中心", percentage: "1"}, {guid: "BMID0154", name: "北京一部研发中心", percentage: "2"}, {guid: "BMID0155", name: "北京二部研发中心", percentage: "3"}, {guid: "BMID0152", name: "北京研发中心", percentage: "1"}, {guid: "BMID0154", name: "北京一部研发中心", percentage: "2"}, {guid: "BMID0155", name: "北京二部研发中心", percentage: "3"} ] 想处理成 [ { name: "北京研发中心", data: [1, 1, 1] }, { name: "北京一部研发中心", data: [2, 2, 2] }, { name: "北京二部研发中心", data: [3, 3, 3] } ] 实现代码 let dataInfo = {} arr.forEach(item => { let { name } = item // name = item.name if (!dataInfo[name]) { dataInfo[name] = { name, // name: name data: [] } } dataInfo[name].data.push(item.percentage) }) let result = Object.values(dataInfo)