[Vuejs]-How to filter array of objects by applying multiple filters from checkboxes?

0👍

Try this:

computed: {
  filteredFlightsList() {
    if (!optionsFilters.length) return this.flightsList;
    return this.flightsList.filter((item) => {
      return this.optionsFilters.every((option) => item[option]); 
    });
  }
}

Leave a comment