Reversing the order of a list

Is there an Airscript function for reversing the order of a list?

Use case: I’m displaying a list of data using a repeater, and I want the most recent entries to be seen at the top (currently the oldest entry is at the top).

You could do something like this (given variable “list”):

FROM
  i
IN
  RANGE(LENGTH(list) - 1, 0, -1)
SELECT
  list[i]
2 Likes

That worked! Thanks, Kyung!

For anyone still having trouble with this, make sure to copy/paste this text into the “Data” field under “Data Binding” in your List component, and swap out list for your list variable name (mine was session.journal_entries):

2 Likes