items for filters
Given a record, iterate on each pair of column name and associated value.
Signature
> items {flags} (closure)
Parameters
closure: The closure to run.
Input/output types:
| input | output |
|---|---|
| record | any |
Examples
Iterate over each key-value pair of a record
> { new: york, san: francisco } | items {|key, value| echo $'($key) ($value)' }
╭───┬───────────────╮
│ 0 │ new york │
│ 1 │ san francisco │
╰───┴───────────────╯Notes
This is a the fusion of columns, values and each.