YAML lists are ordered collections of values, created with a dash - followed by a space before each item. Clean, readable, and easier than JSON arrays.
š Example: List of Strings
Parsed list items will appear here...
š” Pro Tip: Keep list items indented equally under their parent key. Use 2 spaces before each -.
š List of Mappings (Objects)
You can nest mappings inside lists to represent things like multiple users, servers, products, etc.
š This structure is perfect for representing arrays of objects, like user profiles or configuration sets.
š Summary
Start each list item with a - followed by a space
Indent list items under their key with consistent spaces
Lists can hold strings, numbers, mappings (objects), or even other lists
š§ Bonus: Nested Lists
YAML lets you get wild with nesting lists inside lists or inside mappings for deep, structured data.