方法一:
//根据对象数组中某一属性删除该项
removeByValue(arr, attr, value){
var index = 0;
for(var i in arr){
if(arr[i][attr] == value){
index = i;
arr.splice(index,1);
break;
}
}
},
方法二:
//controlSN为数组对象中某一对象的某一属性
let objArrData = [{},{}]
objArrData.map((item, index) => {
if (item.controlSN == '000006') {
objArrData.splice(index, 1);
}
});
array.splice(index, howmany, item1, ....., itemX)