YAML Basics/Nested mapping and list

Combine objects and arrays in one document.

Section: Scalars, maps, and sequences

Nested mapping and list

yaml
yaml
app:
  name: ExpressYou
  pricing:
    monthly: 7.99
    yearly: 59.99
  tools:
    - coach me
    - message generator
Explanation

Nested indentation controls structure. Spaces matter; tabs should be avoided.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Scalars, maps, and sequences
Simple mapping
Define key-value pairs in YAML.
OpenIn sheetyamlsame section
Simple sequence
Represent ordered lists with dashes.
OpenIn sheetyamlsame section
Nulls, booleans, and numbers
Show common scalar values.
OpenIn sheetyamlsame section
Lint a YAML file
Check a file for syntax and style problems.
OpenIn sheetbash1 tag match
Parse YAML with Python
Quickly verify that a YAML file loads successfully.
OpenIn sheetbash1 tag match
Pretty-print YAML with yq
Read and normalize YAML output from the command line.
OpenIn sheetbash1 tag match