I have an array named ReservationResponse
, which represents a successful response retrieved from an API call. The code snippet below demonstrates how it is fetched:
const ReservationResponse = await this.service.getReservation(this.username.value);
The structure of the JSON response is as follows:
[
{
"id":150,
"end_time":"2023-03-03T22:00:00Z",
"start_time":"2023-03-03T16:00:00Z"
},
{
"id":160,
"end_time":"2023-03-06T12:00:00Z",
"start_time":"2023-03-06T09:00:00Z"
}
]
This response presents data starting from the date of the reservations. However, there is now a request to display data starting from today's date instead of the initial reservation date.
I am prepared to make the necessary backend changes, but I am faced with challenges in modifying the front end accordingly.
Is there a method through which I can filter and extract today's date-based information from the response?
Note: This task involves working within Angular, where my experience is limited.