Prefix
Prefixes a yaml document with the given path expression. The complete yaml content will be nested inside the new prefix path.
yq p <yaml_file> <path>Prefix a document
a:
b: [1, 2]yq p data1.yaml c.dc:
d:
a:
b: [1, 2]Updating files in-place
yq p -i data1.yaml cMultiple Documents
Prefix a single document
Prefix all documents
Last updated