1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Improved handling of numeric keys

When there is no match at a given path, numeric keys are assumed to be strings.
To create an array '+' must be used.

e.g: yq n thing[+].cat fred
will create an array under thing, whereas
yq n thing[0].cat fred
will create a map under thing, with a key '0'
This commit is contained in:
Mike Farah
2019-05-16 10:01:34 +10:00
parent c7f5261036
commit 84de9c078d
4 changed files with 8 additions and 8 deletions

View File

@@ -1,2 +1,2 @@
b.c: cat
b.e[0].name: Mike Farah
b.e[+].name: Mike Farah