Skip to main content

reverse

Reverses the order of the items in an array.

Basic Usage

{% set my_array = "a, b, c" | split(", ") %}
{{ my_array | reverse | join(", ") }}

Output: c, b, a