javascript - Remove certain values in multidimensional array -


i have array

arr = [ [1,2,3], [4,5,6], [7,8,9] ] 

i want remove array contains element 4. here remove 4,5,6. it'd arr = [[1,2,3],[7,8,9]];

i tried for loop 0. read remove items array splice in loop didn't work. removed first number instead.

arr.filter(function(v) {    return !v.includes(4); }); 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -