[Vuejs]-Why can I not push data to new object after filtering it with forEach?

3👍

You can simply use a computed:

  computed: {
    currentReservations() {
      return this.reservations.filter((reservation) => reservation.guests.reservationDate < this.currentDate);
    },
  },

Leave a comment