Return the keys of an object as an array.
Section: Selectors and Paths
List object keys
bash
bash
echo '{"name":"alice","age":30}' | jq 'keys'Explanation
Useful for introspection and debugging unknown schemas.
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