On this page
HTTP & JSON jsonArrayReverse

$jsonArrayReverse[]

Reverses the order of items in a JSON array in-place.

Syntax
$jsonArrayReverse[key]

$jsonArrayReverse reverses the order of elements in a JSON array. It operates in-place — the original array is modified. This is useful for displaying data in reverse chronological order or changing the sort direction after an ascending sort. Pair with $jsonArraySort for descending sorts.