I am trying to declare a repeatable part of the list, but it seems that I misunderstand the yaml syntax.
_test:
_const: &const
- a: a
b: b
- c: c
d: d
data:
list_ef:
-
<<: *const
- e: e
f: f
list_gh:
-
<<: *const
- g: g
h: h
so, i need to get data section like this:
data:
list_ef:
- a: a
b: b
- c: c
d: d
- e: e
f: f
list_gh:
- a: a
b: b
- c: c
d: d
- g: g
h: h
but all I get is either error меssages or a nested list or something like this (nested too):
---
_test:
_const:
-
a: a
b: b
-
c: c
d: d
data:
list_ef:
-
? "<<"
:
-
a: a
b: b
-
c: c
d: d
-
e: e
f: f
list_gh:
-
? "<<"
:
-
a: a
b: b
-
c: c
d: d
-
g: g
h: h
What should be the correct syntax for this?