var arr=[{name:'',text:'',isedit:''},{name:'',text:'',isedit:''}]
for (var i = 0; i < arr.length; i++) {
delete arr[i]["isedit"];
}
去除空对象
var zlxx=[{name:'af',text:'d'},{name:'',text:''},]
var zlresult = [];
for (var i = 0; i < self.zlxx.length; i++) {
var obj = self.zlxx[i];
if (!!obj["name"] && !!obj["test"]) {
zlresult.push(obj);
delete self.zlxx[i]['isedit']
}
}
console.log(zlreasult);
删掉isedit这个key
网友评论