🔃
Sort List
base.sortBase SetUtilityTakes a list and sorts it ascending or descending. If the list came from a Vault read, it auto-detects the table schema and lets you pick which column to sort by — no guessing field names. The sorted result becomes a ✨ Spark you can loop over or show directly.
When to use this
- →If the list came from a Vault read, the config panel auto-detects columns — just pick one
- →Leave 'Sort by' blank to sort a simple list of values (numbers or text) directly
- →Chain with a Loop piece to process sorted items one by one
On the canvas
This is what Sort List looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
🔃Utility
Sort List
base.sortlistrequired
{{result}}
by
coins (or leave blank)
direction
select…
asrequired
sorted (becomes a Spark!)
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
list{{result}} | text | yes | List to sort 📋 |
bycoins (or leave blank) | text | — | Sort by 🔑 |
direction | select | — | Order |
assorted (becomes a Spark!) | text | yes | Save result as ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{sorted}}arraySorted list{{sorted.length}}numberNumber of items in sorted{{sorted.0}}stringFirst item after sortingOutput ports
outputMoves on with the sorted list as a Spark
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const sorted = [...rows].sort((a, b) => b.coins - a.coins);
// by column "coins", descending — {{sorted}}More Utility pieces