Determine where I am in array of seconds

I have an array of times that I used to add cue points…

I have a Timecode In and a Timecode Out. My video is 50 minutes long. When I seek I need to determine which timecodes I am between.

so say I have this:


[
{in:0,out:300},
{in:300,out:400},
{in:400,out:600}
]

and I seek to 324 seconds…I need to somehow determine that I am in the second object (or [1]) in the array because it is between 300 and 400…how can I do that?