from yml for formats
Parse text as .yaml/.yml and create table.
Signature
> from yml {flags}
Flags
--spec {string}: YAML spec version ('1.1' or '1.2' (default)).--multiple {string}: Handle multiple documents ('auto', 'list', 'single').--ignore-tags: Ignore any tags--key-resolution {string}: Handle plain scalar keys ('strict' (default), 'verbatim').
Input/output types:
| input | output |
|---|---|
| string | any |
Examples
Converts YAML formatted string to table.
> 'a: 1' | from yml
╭───┬───╮
│ a │ 1 │
╰───┴───╯Converts YAML formatted string to table.
> '[ a: 1, b: [1, 2] ]' | from yml
╭───┬────┬───────────╮
│ # │ a │ b │
├───┼────┼───────────┤
│ 0 │ 1 │ ❎ │
│ 1 │ ❎ │ ╭───┬───╮ │
│ │ │ │ 0 │ 1 │ │
│ │ │ │ 1 │ 2 │ │
│ │ │ ╰───┴───╯ │
╰───┴────┴───────────╯Convert nushell values from YAML.
> '!cell-path $.1.abc?.def!' | from yml
$.1.abc?.def!