Behavior
byis the field, as a dot path such asscoreormeta.date. Withoutby, the items themselves are compared.orderisasc(the default) ordesc.- Numbers compare as numbers and strings as text, so ISO dates sort correctly. The sort is stable.
- Items missing the field go last in either order.
When to use it
- Ordering by a value the items already carry: a date, a count, a score from an earlier step.
- To order items by how well they fit a question, use
builtin__rank.
Input
string
Dot path into each item to sort on, e.g.
url or meta.dateany[]
required
The list, usually a template like {{E1.results}}
enum<string>
Default ascAvailable options:
asc, descOutput
any[]
required