mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-15 07:38:14 +00:00
337 B
337 B
Use the with
operator to conveniently make multiple updates to a deeply nested path.
Update and style
Given a sample.yml file of:
a:
deeply:
nested: value
then
yq eval 'with(.a.deeply.nested ; . = "newValue" | . style="single")' sample.yml
will output
a:
deeply:
nested: 'newValue'