Skip to content

Splat and numeric keys!

Compare
Choose a tag to compare
@mikefarah mikefarah released this 16 May 04:48
· 1597 commits to master since this release

Prefix Splat!

Fixes #218

Delete Splat!

Fixes #175

Support numeric keys

Fixes: #219 and #215

Note there is a (slight) backwards incompatible change.

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'

Extra help description

From #242
Thanks @georgicodes