Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing JSON Data Over Time

  • Changing JSON Data Over Time

    Posted by Cutter Johnston on January 6, 2020 at 7:42 pm

    I have JSON file driving text layers successfully. However, the JSON file represents a few hours of data [see snippet]. How do I get the text layers to change as the timeline advances? The expression is used for all layers with the respective name change.

    Thank you!

    Cutter

    eval("var sales="+footage("csvjson01.json").sourceText);

    sales[0].Sandwiches;

    Cutter Johnston replied 6 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    January 6, 2020 at 11:05 pm

    eval(“var sales=”+footage(“csvjson01.json”).sourceText);

    dur = 1; //Duration, in seconds, of each value
    idx = Math.floor(time/dur);
    (idx < sales.length) ? sales[idx].Sandwiches : sales[sales.length-1].Sandwiches;

    Andrei
    My Envato portfolio.

  • Cutter Johnston

    January 6, 2020 at 11:17 pm

    Andrei,

    That worked! My arse is saved.

    Thank you!

    Cutter

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy