mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Simplify pick
example
Old pick example included input array in command line, making `input` confusing and redundant.
This commit is contained in:
committed by
Emanuele Torre
parent
6b5a18f036
commit
7f547827e4
4
jq.1.prebuilt
generated
4
jq.1.prebuilt
generated
@ -1,5 +1,5 @@
|
||||
.
|
||||
.TH "JQ" "1" "September 2023" "" ""
|
||||
.TH "JQ" "1" "October 2023" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBjq\fR \- Command\-line JSON processor
|
||||
@ -1066,7 +1066,7 @@ jq \'pick(\.a, \.b\.c, \.x)\'
|
||||
{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}
|
||||
=> {"a":1,"b":{"c":2},"x":null}
|
||||
|
||||
jq \'[1,2,3,4] | pick(\.[2], \.[0], \.[0])\'
|
||||
jq \'pick(\.[2], \.[0], \.[0])\'
|
||||
[1,2,3,4]
|
||||
=> [1,null,3]
|
||||
.
|
||||
|
Reference in New Issue
Block a user