First of all, sorry if the title is not precise enough, if anyone has suggestions they are most welcome. I will explain my problem now. I have a JSON file (although here it's a javascript object), which I want to loop through. It's a subtitle file for a movie, and I would like to show the text precisely like you would expect: only at the times specified.
I am not using a video player or anything else in conjunction with this, so it will only be nodejs going through this file. I do know how I can loop through it with a simple for loop, but I am wondering how to loop through it & do so at exactly the times specified in the respective javascript objects?
{ id: '54',
startTime: '00:03:46,572',
endTime: '00:03:53,160',
text: 'Hello this is a text'
},
{ id: '55',
startTime: '00:03:53,160',
endTime: '00:03:58,799',
text: 'To be precise, the subtitle file of a movie'
},