Beginner here, but this forum helped me immensely during the past couple of days. Thanks for the many years of discussion.
My situation: I have an array of elements that I want to use as animation parameters. I'm comfortable accessing a specific piece of data or cycling through the whole array at a specified interval. The catch is that the data is all timestamped in a non-linear way and I only want to access "data1" and "data2" at the moment recorded in "time".
With if...else I can hold until "time" matches the current time. But I'm getting stuck iterating this approach. My first inclination is to increment a counter for later frames, but I'm vaguely aware that After Effects won't hold the value. Hopefully I'm missing something obvious (think I've hit my learning cap for the moment) or there is a completely different approach that somebody could give me a nudge towards.
I included a data sample in case my terminology is wrong.
You are correct about the expression not being able to hold the value, so your expression will need to loop through the "time" fields until it finds the most recent, previous value. If it's a lot of data, you might be able to optimize it somewhat with a binary search, but that might be overkill.