I am looking for a algorithm to get all the object in one array that are not in another array. So given these arrays:
let snap = [
{
"text": "pack bags",
"Id": 0,
"datetime": "16/10/2020 @ 21:26:2"
}
];
let data = [
{
"text": "pack bags",
"Id": 0,
"datetime": "16/10/2020 @ 21:26:2"
},
{
"text": "booking tickets",
"Id": 1,
"datetime": "1/11/2020 @ 22:18:17"
}
];
I want to end up with this array:
updateData = [
{
"text": "booking tickets",
"Id": 1,
"datetime": "1/11/2020 @ 22:18:17"
}
]