parent: &defaults
  a: 2
  b: 3
child:
  <<: \*defaults
  b: 4

#↓ Equivalent JSON

{
  "parent": {
    "a": 2,
    "b": 3
  },
  "child": {
    "a": 2,
    "b": 4
  }
}
Comments