Skip to content

Instantly share code, notes, and snippets.

@amalagaura
Created October 23, 2020 14:44
Show Gist options
  • Save amalagaura/c8b5c7c92402120ed76dec95dfafb276 to your computer and use it in GitHub Desktop.
Save amalagaura/c8b5c7c92402120ed76dec95dfafb276 to your computer and use it in GitHub Desktop.
---
id: 1
type: book
awards:
books:
- id: 1
title: International Botev
reviewers:
- id: 2
name: PersonB
- id: 2
title: Dayton Literary Peace Prize
reviewers:
- id: 3
name: PersonC
#! How do I add a map to an array of maps?
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all
---
awards:
books:
#@overlay/match by=overlay.all, expects="1+"
#@overlay/match missing_ok=True
reviewers:
#@overlay/append
- id: 1
name: PersonA
#! How do I add a map to an array of maps?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment