items for filters

Given a record, iterate on each pair of column name and associated value.

Signature

> items (closure)

Parameters

  • closure: the closure to run

Notes

This is a the fusion of columns, values and each.

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 │
╰───┴───────────────╯