Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify in the manual how map_values() behaves differently from map(). #2473

Closed
wants to merge 1 commit into from

Conversation

jbrains
Copy link
Contributor

@jbrains jbrains commented Aug 30, 2022

Fixes #2466

@wader
Copy link
Member

wader commented Aug 31, 2022

LGTM 👍

@itchyny
Copy link
Contributor

itchyny commented Jun 5, 2023

      When any other type of value is passed to it, `map_values(x)`
      behaves the same as `map(x)`.

Not always. At least I can give a counterexample as follows.

 $ jq -n -c '[1,2,3] | map_values(.,.+10)'
[1,2,3]
 $ jq -n -c '[1,2,3] | map(.,.+10)' 
[1,11,2,12,3,13]

@pkoppstein
Copy link
Contributor

Closing as this issue was specifically dealt with subsequently in 8345a8a

@jbrains - If the current version of manual.yml is still not to your liking, please feel free to submit a new PR. Thanks.

@pkoppstein pkoppstein closed this Jul 29, 2023
@jbrains jbrains deleted the clarify-map-values-in-manual branch May 21, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: unclear explanation of map_values()
4 participants