I have an array of arrays and I need to filter by position 0 elements.
I need to filter out several values extracted from another array, so the OR operator is not my path, because the number of values that I have is not fixed.
var arr = [
["202",27,44],
["202",194,35],
["200",233,344],
["190",333,444],
];
var newArr = arr.filter(function(item){
return item[0] === "190" || item = "200"
});
I need something like
var newArr = arr.filter(function(item){
return item[0] === filterValues
});
Functionin this case should return:
[["200",233,344],["190",333,444]]
This question uses underscorejs, but im new to javascript, so it was difficult for me to apply it to my problem.
And this is for Angularjs.
I hope you can lend a hand to me.
PS: Sorry for my English, this is not my native language.
considers