[Vuejs]-Array.filter() not working properly in Vue.js

8👍

filter doesn’t mutate the array, it returns a new one. You probably need to

this.participants = this.participants.filter(function (participant) {
  return (participant.cost_center == 2);
});

Leave a comment