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> |
Examples
Split a cell-path into its components
> $.5?.c | split cell-path
╭───┬───────┬──────────╮
│ # │ value │ optional │
├───┼───────┼──────────┤
│ 0 │ 5 │ true │
│ 1 │ c │ false │
╰───┴───────┴──────────╯
Split a complex cell-path
> $.a.b?.1."2"."c.d" | split cell-path
╭───┬───────┬──────────╮
│ # │ value │ optional │
├───┼───────┼──────────┤
│ 0 │ a │ false │
│ 1 │ b │ true │
│ 2 │ 1 │ false │
│ 3 │ 2 │ false │
│ 4 │ c.d │ false │
╰───┴───────┴──────────╯