4 ms·
For exploratory purposes one can also use `jq 'keys'` ``` cat file.json | jq 'keys' | grep ependencies ``` This will list the keys, sometimes is really helpfu
by woile 5y ago
For exploratory purposes one can also use `jq 'keys'`
```
cat file.json | jq 'keys' | grep ependencies
```
This will list the keys, sometimes is really helpful with a big json that you don't know the schema, but you have the intuition that some key should be there.
- xorcist 5y agoShould you wish to jq can search too without the need of piping through a shell: jq 'keys | map(select(test("ependencies")))' file.json map(select()) is a pretty useful construct to loop over stuff and pick out the interesting parts.