Lets suppose I've this
a: "ABC"
b: *a
I want b
to have the same content than a
, keep in mind that a is an string, not an array.
is this possible?
Lets suppose I've this
a: "ABC"
b: *a
I want b
to have the same content than a
, keep in mind that a is an string, not an array.
is this possible?
Yes, that's called an alias.
You make an Anchor with &anchorname
and refer to it with *anchorname
a: &a "ABC"
b: *a
You can also use an array to define many aliases which is quite succinct.
aliases:
- &foo "foo"
- &bar "bar"
test1: *foo
test2: *bar