Posts Linux filter json using jq
Post
Cancel

Linux filter json using jq

  • Print json
1
2
3
4
5
6
$ echo '{"bla":"bla"}' | jq '.'

{
  "bla": "bla"
}

  • Filter json
1
2
3
4
5
$ echo '{"bla":"bla","blaa":"blaa"}' | jq '{"bla"}'

{
  "bla": "bla"
}
This post is licensed under CC BY 4.0 by the author.