数组对象替换key

const { typeChart } = this.props; 
let echartData = [];  
        if(typeChart){
            for(var i in typeChart){ 
                echartData.push({name:typeChart[i].x,value:typeChart[i].y}) ;
            }
        }

 

posted @ 2020-05-29 17:57  a茶色  阅读(361)  评论(0编辑  收藏