Cheatsheet Pages / jq Cheatsheet
How to match strings with a regex inside jq — test()
Keep the rows whose name matches a pattern — here, names starting with a.
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 -r '.users[] | select(.name | test("^a")) | .name' config.json
# output: ana (names starting with "a")
