-
Using time data from an array
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.
[
{
"time": 1.340790625,
"data1": 0.06143156249999748,
"data2": 0.44881889763779525
},
{
"time": 1.742766718749998,
"data1": 0.08012812499999811,
"data2": 0.4251968503937008
},
{
"time": 1.951099843749997,
"data1": 0.10550203124999768,
"data2": 0.4566929133858268
}
]