const { typeChart } = this.props; let echartData = []; if(typeChart){ for(var i in typeChart){ echartData.push({name:typeChart[i].x,value:typeChart[i].y}) ; } }
数组对象替换key
原文:https://www.cnblogs.com/ding-dong/p/12988855.html