diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-02-17 12:28:26 -0600 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-02-20 15:33:07 -0600 |
commit | fe29d3d3fa4a147a5103f314bc09287c4c32a81d (patch) | |
tree | 0f4d4c5625016c2631cf6b101436bb8d11bb8501 /config | |
parent | 3d33412e9a88f86510b2dc8afe6ac4e82b1a44df (diff) |
Add `?`, `.[]?`, and `..` operators
Make XPath-like `//a/b` recursive structure traversal easier in jq,
which then becomes:
..|.a?.b?
The `?` operator suppresses errors about . not being an array or object.
The `..` operator is equivalent to calling the new `recurse_down`
built-in, which in turn is equivalent to
recurse(.[]?)
Note that `..a` is not supported; neither is `...a`. That could be add
added, but it doesn't seem worth the trouble of saving the need to type
a '|'.
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions