diff options
author | J. B. Rainsberger <me@jbrains.ca> | 2024-02-08 09:52:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 13:52:50 +0000 |
commit | 92d35378ff5b52db879ef85f8321e4aae0fca1fb (patch) | |
tree | e146f3c657d6ed5fa88b4fbebd575473dcbee023 /jq.1.prebuilt | |
parent | 54cc15c127ed561571f5735d17d7f0c4747a35b0 (diff) |
Fix typo in documentation for map_values (#3035)
* Fix typo in documentation for map_values
"map_value(f)" -> "map_values(f)"
* map_value => map_values also in the devolpment manual
---------
Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>
Diffstat (limited to 'jq.1.prebuilt')
-rw-r--r-- | jq.1.prebuilt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jq.1.prebuilt b/jq.1.prebuilt index 00f35824..f3103fb9 100644 --- a/jq.1.prebuilt +++ b/jq.1.prebuilt @@ -1,5 +1,5 @@ . -.TH "JQ" "1" "January 2024" "" "" +.TH "JQ" "1" "February 2024" "" "" . .SH "NAME" \fBjq\fR \- Command\-line JSON processor @@ -1004,7 +1004,7 @@ When the input to \fBmap_values(f)\fR is an object, the output object has the sa The key difference between \fBmap(f)\fR and \fBmap_values(f)\fR is that the former simply forms an array from all the values of \fB($x|f)\fR for each value, $x, in the input array or object, but \fBmap_values(f)\fR only uses \fBfirst($x|f)\fR\. . .P -Specifically, for object inputs, \fBmap_value(f)\fR constructs the output object by examining in turn the value of \fBfirst(\.[$k]|f)\fR for each key, $k, of the input\. If this expression produces no values, then the corresponding key will be dropped; otherwise, the output object will have that value at the key, $k\. +Specifically, for object inputs, \fBmap_values(f)\fR constructs the output object by examining in turn the value of \fBfirst(\.[$k]|f)\fR for each key, $k, of the input\. If this expression produces no values, then the corresponding key will be dropped; otherwise, the output object will have that value at the key, $k\. . .P Here are some examples to clarify the behavior of \fBmap\fR and \fBmap_values\fR when applied to arrays\. These examples assume the input is \fB[1]\fR in all cases: |