Home Explore Blog CI



nushell

commands/docs/from_yaml.md
5b8b92df107d73e4e788e34e3e523ebe18fed078869355420000000300000503
---
title: from yaml
categories: |
  formats
version: 0.104.0
formats: |
  Parse text as .yaml/.yml and create table.
usage: |
  Parse text as .yaml/.yml and create table.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `from yaml` for [formats](/commands/categories/formats.md)

<div class='command-title'>Parse text as .yaml&amp;#x2f;.yml and create table.</div>

## Signature

```> from yaml {flags} ```


## Input/output types:

| input  | output |
| ------ | ------ |
| string | any    |
## Examples

Converts yaml formatted string to table
```nu
> 'a: 1' | from yaml
╭───┬───╮
│ a │ 1 │
╰───┴───╯
```

Converts yaml formatted string to table
```nu
> '[ a: 1, b: [1, 2] ]' | from yaml
╭───┬────┬───────────╮
│ # │ a  │     b     │
├───┼────┼───────────┤
│ 0 │  1 │    ❎     │
│ 1 │ ❎ │ ╭───┬───╮ │
│   │    │ │ 0 │ 1 │ │
│   │    │ │ 1 │ 2 │ │
│   │    │ ╰───┴───╯ │
╰───┴────┴───────────╯

```

Chunks
d7fdcb28 (1st chunk of `commands/docs/from_yaml.md`)
Title: from yaml: Parse YAML text into a table
Summary
The `from yaml` command parses text formatted as YAML (.yaml or .yml) and converts it into a Nushell table. Examples show converting simple key-value pairs and more complex structures like lists and nested data into table representations.