I have to retrieve the values that exist only on Array B, but do not exist on Array A.
From my research, It is called:
Values in the arrays may not be primitives.I need an efficient and functional apporach to this problem.
I have found lodash _.without
function, but it supports only array of primitive numbers.
Array A:
[{
id: 1
},
{
id:2
}]
Array B:
[{
id:2
},
{
id:3
}]
result should be:
[{
id:3
}]
this object is the only one who exist on Array B, but not on Array A.