mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
321 B
321 B
Get anchor
Given a sample.yml file of:
a: &billyBob cat
then
yq eval '.a | anchor' sample.yml
will output
billyBob
Set anchor name
Given a sample.yml file of:
a: cat
then
yq eval '.a anchor = "foobar"' sample.yml
will output
a: &foobar cat