W3cubDocs

/Nushell

from yaml for formats

Parse text as .yaml/.yml and create table.

Signature

> from yaml {flags}

Input/output types:

input output
string any

Examples

Converts yaml formatted string to table

>'a: 1'|from yaml
╭───┬───╮
a1
╰───┴───╯

Converts yaml formatted string to table

>'[ a: 1, b: [1, 2] ]'|from yaml
╭───┬────┬───────────╮
# │ a  │     b     │
├───┼────┼───────────┤
01
1╭───┬───╮
01
12
╰───┴───╯
╰───┴────┴───────────╯

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/from_yaml.html