I have 2 arrays of JavaScript objects:
arr1=[{'id':'A'},{'id':'B'}, {'id':'C'}];
arr2=[{'id':'A'},{'id':'C'}, {'id':'D'}, {'id': 'E'}];
How do I get only elements without duplicates?
Thanks.
EDIT
I dont want to remove the duplicate. I want to ONLY get the unique object.
output = [{'id':'B'}, {'id':'D'}, {'id':'E'}]
NOT
output = [{'id':'A'},{'id':'B'}, {'id':'C'}, {'id':'D'}, {'id':'E'}]
Sorry if I wasn't being clear