I have an array of objects A obtained from JSON data which is like:
[Object { field1="2381", field2="1233", field3="46.44852", more...},
Object { field1="2381", field2="1774", field3="45.70752833333334", more...}]
And I have another array B like
["2381", "1187"]
Is there a way to check if values of this array B exists in array A?
I tried with something like
A.map((B[0], B[1]), function(element) {
if (B[0] == element.field1 && B[1] == element.field2)
return true;
else
return false;
});
but it didn't worked well...
Any trick?