Skip to content

Commit

Permalink
jq: clarify json text input from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
agnivade authored and sbrl committed Apr 17, 2018
1 parent a2d755a commit 1fd030e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/common/jq.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

`jq .[0] {{file.json}}`

- Output the value of a given key of the first element in a JSON from stdin:
- Output the value of a given key of the first element in a JSON text from stdin:

`cat {{file.json}} | jq .[0].{{key_name}}`

- Output the value of a given key of each element in a JSON from stdin:
- Output the value of a given key of each element in a JSON text from stdin:

`cat {{file.json}} | jq 'map(.{{key_name}})'`

0 comments on commit 1fd030e

Please sign in to comment.