In my Javascript array, I have the teaching schedule of a teacher for the day.
{
"time": [
{ "start":"10:00","end":"11:00" },
{ "start":"12:00","end":"01:00" },
{ "start":"04:00","end":"06:00" }
]
}
My goal is to determine the free hours in the above array between 10 AM and 6 PM.
The output array will be structured as follows:
{
"time": [
{ "start":"09:00","end":"10:00" },
{ "start":"11:00","end":"12:30" },
{ "start":"01:00","end":"04:00" }
]
}
I would appreciate your assistance in solving this problem.