1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00
yq/pkg/yqlib/doc/Entries.md
2021-05-09 13:59:23 +10:00

365 B

to_entries Map

Given a sample.yml file of:

a: 1
b: 2

then

yq eval 'to_entries' sample.yml

will output

- key: a
  value: 1
- key: b
  value: 2

to_entries Array

Given a sample.yml file of:

- a
- b

then

yq eval 'to_entries' sample.yml

will output

- key: 0
  value: a
- key: 1
  value: b