How to check the input timestamp is between the given array of objects

  arrayobject, javascript, momentjs, reactjs, time

I am working in react JS . I need to find whether the input timestamp (Eg: 09:10) in between the given array objects. The below shows the sample array object. If the input time is 09:10, it needs to loop through the array object and check whether the input time is between start and end .If any of the object value satisfies the condition it returns true else false. I think the idea is clear. Can someone help me to find a solution for it?

let timeSlot=[{start:"08:35" end:"10:40"}, {start:"07:03" end:"08:24"},{start:"09:00" end:"09:15"]

Source: Ask Javascript Questions

LEAVE A COMMENT