split cell-path
for conversions
Split a cell-path into its components.
Signature
> split cell-path {flags}
Input/output types:
input | output |
---|---|
cell-path | list<any> |
cell-path | list<record<value: any, optional: bool, insensitive: bool>> |
Examples
Split a cell-path into its components
> $.5?.c | split cell-path
╭───┬───────┬──────────┬─────────────╮
│ # │ value │ optional │ insensitive │
├───┼───────┼──────────┼─────────────┤
│ 0 │ 5 │ true │ false │
│ 1 │ c │ false │ false │
╰───┴───────┴──────────┴─────────────╯
Split a complex cell-path
> $.a!.b?.1."2"."c.d" | split cell-path
╭───┬───────┬──────────┬─────────────╮
│ # │ value │ optional │ insensitive │
├───┼───────┼──────────┼─────────────┤
│ 0 │ a │ false │ true │
│ 1 │ b │ true │ false │
│ 2 │ 1 │ false │ false │
│ 3 │ 2 │ false │ false │
│ 4 │ c.d │ false │ false │
╰───┴───────┴──────────┴─────────────╯