[Vuejs]-Delete element with a specific value from an array

0👍

One more (polyfill):

var array = [{id:1},{id:0},{id:0},{id:2}];
array = array.filter(x => x.id != 0);
console.log(array);

x => x.id != 0 is the same as function (x) { return x.id != 0; }.

Leave a comment