数组中的对象里加键值对

let backTabledata = [
{
id:'126652',
no: '1',
longitude: '103.94292',
latitude: '30.620123',
altitude: 501.00143,
distance:'--'
}, {
id:'122855',
no: '2',
longitude: '103.94292',
latitude: '30.620123',
altitude: 501.00143,
distance:'258.25'
}, {
id:'1285569',
no: '3',
longitude: '103.94292',
latitude: '30.620123',
altitude: 501.00143,
distance:'253'
}, {
id:'1222555',
no: '4',
longitude: '103.94292',
latitude: '30.620123',
altitude: 501.00143,
distance:'253'
}];
for(let i in backTabledata){
//console.log(data[i]);
backTabledata[i].longitudeflag = false;
backTabledata[i].latitudeflag = false;
backTabledata[i].altitudeflag = false;
}
this.tableData = backTabledata;
posted on 2018-11-06 09:54  忆小样  阅读(5164)  评论(0编辑  收藏  举报