Just using the Array iteration methods built into JS is fine for this:
var result1 = [_x000D_
{id:1, name:'Sandra', type:'user', username:'sandra'},_x000D_
{id:2, name:'John', type:'admin', username:'johnny2'},_x000D_
{id:3, name:'Peter', type:'user', username:'pete'},_x000D_
{id:4, name:'Bobby', type:'user', username:'be_bob'}_x000D_
];_x000D_
_x000D_
var result2 = [_x000D_
{id:2, name:'John', email:'[email protected]'},_x000D_
{id:4, name:'Bobby', email:'[email protected]'}_x000D_
];_x000D_
_x000D_
var props = ['id', 'name'];_x000D_
_x000D_
var result = result1.filter(function(o1){_x000D_
// filter out (!) items in result2_x000D_
return !result2.some(function(o2){_x000D_
return o1.id === o2.id; // assumes unique id_x000D_
});_x000D_
}).map(function(o){_x000D_
// use reduce to make objects with only the required properties_x000D_
// and map to apply this to the filtered array as a whole_x000D_
return props.reduce(function(newo, name){_x000D_
newo[name] = o[name];_x000D_
return newo;_x000D_
}, {});_x000D_
});_x000D_
_x000D_
document.body.innerHTML = '<pre>' + JSON.stringify(result, null, 4) +_x000D_
'</pre>';
_x000D_
If you are doing this a lot, then by all means look at external libraries to help you out, but it's worth learning the basics first, and the basics will serve you well here.