1var result = result1.filter(function (o1) {
2 return result2.some(function (o2) {
3 return o1.id === o2.id; // return the ones with equal id
4 });
5});
6// if you want to be more clever to find those in common:
7let result = result1.filter(o1 => result2.some(o2 => o1.id === o2.id));
8
9// To find those in 1 NOT in 2:
10let result = result1.filter(o1 => !result2.some(o2 => o1.id === o2.id));