deoren / notes

Various notes for topics I'm learning
2 stars 0 forks source link

YAML - When to use '-' character? #82

Open deoren opened 5 years ago

deoren commented 5 years ago
-
  name: Mark McGwire
  hr:   65
  avg:  0.278
-
  name: Sammy Sosa
  hr:   63
  avg:  0.288

I kept mentally mixing up the - character with a Markdown list item, but that's not the case at all. Instead, this is what (I think) we're actually getting:

[
  {"name": "Mark McGwire", "hr": 65, "avg": 0.278},
  {"name": "Sammy Sosa", "hr": 63, "avg": 0.288}
]