Filter json file with jq
Let's say we have the file data.json
with a json compacted in one line:
$ cat data.json
{"employees":[{"name":"Shyam","email":"shyamjaiswal@example.com"},{"name":"Bob","email":"bob32@example.com"},{"name":"Jai","email":"jai87@example.com"}]}
We can use the command jq to see it in with nicer format: