I can get top-level JSON keys with jq
as
jq 'keys'
E.g., see this question: Get key names from JSON file using jq
And I can enable recursion in jq
:
jq '..'
As in: Recursive search values by key
But jq '.. | keys'
returns jq: error at <stdin> string has no keys
.