Sorting an array by dates

Hello Makers, my scenario gets an array (get departure) and loops through each item, looking up its details (get booking modul) and creating a row (tour overviews rows). The result is added to a summary (create tour overview).

I’m trying to sort the items (bookings) by date in ascending order to have a chronological order. Could you advise how to do so?

You’ll need to create a new timestamp (in seconds) property so that you can sort the aggregated array using the built-in function sort.

3 Likes

Thanks @samliew, could you shortly summarize how to add that timestamp property?

Sure. Use a set variable module with a formatDate to format the date in seconds.

3 Likes