let obj1 = [ {id:1, name:"вася"}, {id:2, name:"петя"}, {id:3, name:"маша"}, {id:4, name:"даша"} ]; let obj2 = [ {id:1}, {id:2} ]; var filtred = obj1.filter(el=> obj2.some(el2=> el2.id==el.id)); console.log(filtred);