如何提取数组中的字段,然后添加新的字段,获取数据如下:vardata=[{"id":"1","name":"华为","data":"25u6s8f545d3"},{"id":"2","name":"小米","data":"cd58de9d3c5d"},];我想获得的数据格式如下:vardata=[{"id":"1","name":"华为","data":"25u6s8f545d3","mac":"25:u6:s8:f5:45:d3"},{"id":"2","name":"小米","data":"cd58de9d3c5d","mac":"cd:58:de:9d:3c:5d"},];我现在方法如下:for(vari=0;i
添加回答
举报
0/150
提交
取消