Cheatsheet Pages / jq Cheatsheet
How to pluck one field from every element with jq map
You have an array of objects and need an array of just their names.
Every filter was executed against the cheatsheet's sample config.json with jq 1.7 before publishing; the sample file sits at the bottom of the cheatsheet so you can reproduce every output.
jq '.users | map(.name)' config.json
# output: ["ana","bruno","carla"]
