Emit all existing paths inside a document.
Section: Selectors and Paths
List all JSON paths
bash
bash
echo '{"user":{"name":"alice","roles":["admin"]}}' | jq 'paths'Explanation
`paths` helps inspect complex or unfamiliar nested JSON structures.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Selectors and Paths