Difference between object arrays

0

I need to find what does not have in one array for others, I think in an example I can explain better:

I have an array of objects as follows:

NATIVO: [{"_id": "asd12312312", "name": "item 01"}, {"_id": "1123rwerwe", "name": "item 02"}];

But I did an update with one value and added another, so it looks like this:

NOVO: [{"_id": "1123rwerwe", "name": "item 02"}, {"name": "item 03"}];

This function needs to return what was taken in another array, ie I need this result object:

RESULTADO: [{"_id": "asd12312312", "name": "item 01"}];

asked by anonymous 27.04.2018 / 19:45

0 answers