I am working in google app script
Please see the array of objects below, I’m trying to return the available array but with out the booked array timing in it
this is a sample of the Available array
[{"ID":362,"startDate":"2021-11-01T04:00:00.000Z","endDate":"2040-12-30T05:00:00.000Z","startTime":"1899-12-30T17:30:00.000Z","endTime":"1899-12-30T18:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":434,"startDate":"2022-01-01T05:00:00.000Z","endDate":"2040-12-30T05:00:00.000Z","startTime":"1899-12-30T16:30:00.000Z","endTime":"1899-12-30T17:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":614,"startDate":"2022-01-02T05:00:00.000Z","endDate":"2040-12-30T05:00:00.000Z","startTime":"1899-12-31T01:45:00.000Z","endTime":"1899-12-31T02:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":732,"startDate":"2022-04-07T04:00:00.000Z","endDate":"2040-12-30T05:00:00.000Z","startTime":"1899-12-30T18:30:00.000Z","endTime":"1899-12-30T19:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":758,"startDate":"2021-11-01T04:00:00.000Z","endDate":"2040-12-30T05:00:00.000Z","startTime":"1899-12-30T15:00:00.000Z","endTime":"1899-12-30T19:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"}]
and this is a sample of the Booked array (the ones that don’t have a end date are till the end of the world)
[{"ID":185,"startDate":"2022-01-01T05:00:00.000Z","endDate":"","startTime":"1899-12-30T16:30:00.000Z","endTime":"1899-12-30T17:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":247,"startDate":"2022-01-02T05:00:00.000Z","endDate":"","startTime":"1899-12-31T01:45:00.000Z","endTime":"1899-12-31T02:30:00.000Z","daysOfWeek":"Sunday,Tuesday,Thursday"},
{"ID":624,"startDate":"2021-11-01T04:00:00.000Z","endDate":"","startTime":"1899-12-30T17:30:00.000Z","endTime":"1899-12-30T18:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":901,"startDate":"2022-04-07T04:00:00.000Z","endDate":"2022-04-22T04:00:00.000Z","startTime":"1899-12-30T18:30:00.000Z","endTime":"1899-12-30T19:30:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"},
{"ID":1052,"startDate":"2022-04-12T04:00:00.000Z","endDate":"","startTime":"1899-12-30T15:15:00.000Z","endTime":"1899-12-30T16:15:00.000Z","daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday"}]
I know this is a hard one but please help me out
Thank you so much for your time
