[Vuejs]-VueJS dynamic inputs avoid duplicates

0👍

You can use the following function:

this.alert.filters = this.alert.filters.filter((value, index, self) => 
{
  return index === self.findIndex(item =>
  {
    return item.type === value.type; // && item.timeFrame === value.timeFrame && item.min === value.min && item.max === value.max;
  });
});

Leave a comment