1
0
mirror of https://github.com/mikefarah/yq.git synced 2025-03-15 00:15:36 +00:00
yq/pkg/yqlib/doc/Split into Documents.md
2021-02-11 10:58:40 +11:00

344 B

Split into Documents

This operator splits all matches into separate documents

Split empty

Running

yq eval --null-input 'splitDoc'

will output


Split array

Given a sample.yml file of:

- a: cat
- b: dog

then

yq eval '.[] | splitDoc' sample.yml

will output

a: cat
---
b: dog