I have two arrays. One array consists of values of the second array of objects and the second array is a collection of objects. Let's consider two arrays arr1 and arr2 . In here first array is the collection of values of the key id in the second array.
Here is the example arrays.
const arr1=[1,2,3,4] , const arr2=[{id:1,name:"john"},{id:2,name:"james"},{id:3,name:"sam"},{id:4,name:"dani"},{id:5,name:"junaif"},{id:6,name:"david"}]
In the above example of code I want to find out which are not included in the second array. example output from the above code will be,
arr3=[{id:5,name:"junaif"},{id:6,name:"david"}]