let arr1 = [{ id: 1 }, { id: 2 }, { id: 3 }]; let arr2=[{ id: 1 }, { id: 2 }]; let newArr = arr1 .filter((x) => !arr2.some((item) => x.id === item.id));