I have two array of objects.
e = [{uniqueId:'',active:'a',qId:10},{uniqueId:'',active:'a',qId:11}]
f = [{uniqueId:50,active:'a',qId:10},{uniqueId:51,active:'a',qId:11},{uniqueId:52,active:'a',qId:13}]
I want to compare these objects and my final result will be like
result = [{uniqueId:50,active:'a',qId:10},{uniqueId:51,active:'a',qId:11}]
I tried
let result = e.filter(o1 => f.some(o2 => o1.qId != o2.qId));
But am getting
[{uniqueId:50,active:'a',qId:10},{uniqueId:51,active:'a',qId:11},{uniqueId:52,active:'a',qId:13}]
How to achieve the desired output?