项目小计 A李士元 2021-02-08 78 阅读1分钟 js 修改数组对象中对象属性名 方法1: this.chartRoleCount.map(v=>{return {value:v.num,name: v.role};}) 方法2: JSON.parse(JSON.stringify(data).replace(/name/g, ‘desc’).replace(/code_url/g, ‘url’))