mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 07:55:24 +02:00
jq: clarify json text input from stdin
This commit is contained in:
parent
a2d755a504
commit
1fd030ef01
1 changed files with 2 additions and 2 deletions
|
@ -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}})'`
|
||||
|
|
Loading…
Add table
Reference in a new issue