Keys
Last updated
- 0
- 1- 1
- 2
- 3yq '.[1] | key' sample.yml1a: thingyq '.a | key' sample.ymla{}yq 'key' sample.ymla:
x: 3
y: 4yq '(.a.x | key) = "meow"' sample.ymla:
meow: 3
y: 4a:
# comment on key
x: 3
y: 4yq '.a.x | key | headComment' sample.ymlcomment on keya:
b:
- cat
c: frogyq '[... | { "p": path | join("."), "isKey": is_key, "tag": tag }]' sample.yml- p: ""
isKey: false
tag: '!!map'
- p: a
isKey: true
tag: '!!str'
- p: a
isKey: false
tag: '!!map'
- p: a.b
isKey: true
tag: '!!str'
- p: a.b
isKey: false
tag: '!!seq'
- p: a.b.0
isKey: false
tag: '!!str'
- p: a.c
isKey: true
tag: '!!str'
- p: a.c
isKey: false
tag: '!!str'