Sort

Puts a list in order.

Fields

FieldTypeRequiredWhat it does
itemsjsonatayesExpression producing the list.
byjsonataThe key to order by, worked out per item, for example total. Without it the values themselves are ordered.
directionone of: asc, descUp or down. Defaults to up.

Output

items (in order), total, direction

Notes

Numbers compare as numbers, text the way a person expects ("9" before "10"), and items with no key go last either way. Items with the same key keep the order they arrived in.