Cheatsheet Pages / jq Cheatsheet
How to extract one field from JSON with jq
You need a single value out of an object — and strings come back quoted, which is normal JSON.
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 '.name' config.json
# input: {"name":"api-server","port":8080}
# output: "api-server"
