`path(pattern)` will produce array representations of the
paths matching `pattern` if the paths exist in `.`.
+ Note that the path expressions are not different from normal
+ expressions. The expression
+ `path(..|select(type=="boolean"))` outputs all the paths to
+ boolean values in `.`, and only those paths.
+
examples:
- program: 'path(.a[0].b)'
input: 'null'
input, and produce the output {"a": 20}. The latter will set the "a"
field of the input to the "a" field's "b" field, producing {"a": 10}.
+ The left-hand side can be any general path expression; see `path()`.
+
Note that the left-hand side of '|=' refers to a value in `.`.
Thus `$var.foo |= . + 1` won't work as expected; use `$var |
.foo |= . + 1` instead.
+ examples:
+
+ - program: '(..|select(type=="boolean")) |= if . then 1 else 0 end'
+ input: '[true,false,[5,true,[true,[false]],false]]'
+ output: ['[1,0,[5,1,[1,[0]],0]]']
+
- title: "`+=`, `-=`, `*=`, `/=`, `%=`, `//=`"
body: |