var arr = ["1122","2233","3344"] var newArr = [ {id:"1122",name:"Wang"}, {id:"11",name:"Zhang"}, {id:"2233",name:"Shen"}, {id:"3344",name:"EER"}, {id:"5566",name:"BMW"}, ] arr.forEach((item) => { newArr.forEach(i => { if(item == i.id){ i.flag = true } }) }) console.log(newArr.filter((item) => { return !item.flag }));