I have an array of integers like this:
var items = [
[1, 1, 2, 4],
[2, 1, 4, 6],
[5, 6, 4, 1],
[1, 6, 3, 1]
];
Is there a simple way to find and remove all arrays with specific values in a defined position? For example, if I want to remove all arrays with '1' on the second position, the result should be:
var items = [
[5, 6, 4, 1],
[1, 6, 3, 1]
];
If I remove all with '4' on the third position, the result should be:
var items = [
[1, 1, 2, 4],
[1, 6, 3, 1]
];
I know I can do this by looping through all elements, but this seems to take quite long when the two-dimensional array is large (>1000 arrays).