-
Consider below input yaml
I want to convert it to below csv
I tried below and more - didn't work.
I understand for csv to work, it has to be array of arrays like below,
No header but still ok. Is there a way to convert |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Jul 29, 2022
Replies: 1 comment 2 replies
-
Good question - I should update the guide with this example. yq '[["name", "species", "color"]] + [.items[] | [.name, .species, .color]]' examples/data1.yaml -o=csv
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
balki
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good question - I should update the guide with this example.
yq '[["name", "species", "color"]] + [.items[] | [.name, .species, .color]]' examples/data1.yaml -o=csv