mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
434802341e
Here is the awesome manual: http://stedolan.github.io/jq/manual/
14 lines
177 B
Plaintext
14 lines
177 B
Plaintext
# Pretty print the json
|
|
jq "." < filename.json
|
|
|
|
# Access the value at key "foo"
|
|
jq '.foo'
|
|
|
|
# Access first list item
|
|
jq '.[0]'
|
|
|
|
# Slice & Dice
|
|
jq '.[2:4]'
|
|
jq '.[:3]'
|
|
jq '.[-2:]'
|