I have the following array:
[
{
id: 1
},
{
id: 2
},
{
id: 3
},
{
id: 4
}
]
Every 5 seconds my application receives a new array and I need to compare the difference between the next one...
So the next array is:
[
{
id: 1
},
{
id: 2
},
{
id: 4
}
]
How can I compare with the previous and get an array with the excluded item?
[
{
id: 3
}
]