I have two JSON arrays like this :
var modelType = [
{ 'id' : 3, 'name': 'eR_Beta'},
{ 'id' : 12, 'name': 'eR_Studio'},
{ 'id' : 6, 'name': 'eR_OFF'},
{ 'id' : 9, 'name': 'eR_Schalte'}
];
var data = [
{id: 12}
{id: 6}
]
I would like to compare these arrays with "id" as key and get the not matching objects to another array like this :
var output = [
{ 'id' : 3, 'name': 'eR_Beta'},
{ 'id' : 9, 'name': 'eR_Schalte'}
]