批量删除

let a=data
let b=[1,2,3]

for(let i = 0; i < a.length;i++){
   for(let s = 0; s<b.length;s++){
    if(a[i].id == b[s]){

     a.splice(i,1)
 }
   
}
  
}

 

posted @ 2020-08-05 22:52  lipu1993  阅读(120)  评论(0编辑  收藏  举报