I have 2 arrays of objects array 1 and array 2, I want to remove the objects of array 2 from array 1. There can be more than 1 objects that I remove simultaneously.
Data of array 1
let arr1 = [
{ id: "1", txt: "first"},
{ id: "2", txt: "second"},
{ id: "3", txt: "third"}
]
Data of array 2
let arr2 = [
{ id: "2", txt: "second"},
]
Result
{ id: "1", txt: "first"},
{ id: "3", txt: "third"}