-
Notifications
You must be signed in to change notification settings - Fork 0
/
jq_commands.txt
53 lines (46 loc) · 3.27 KB
/
jq_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cat star_trek.json| jq '.'
cat star_trek.json | jq 'keys'
cat star_trek.json | jq '.[] | keys'
cat star_trek.json | jq '.[] | .score'
cat star_trek.json | jq '.[] | .show'
cat star_trek.json | jq '.[] | .show | keys'
cat star_trek.json | jq '.[] | .show | .name'
cat star_trek.json | jq '.[] | .show | [.name, .network]'
cat star_trek.json | jq '.[] | .show | [.name, .webChannel]'
cat star_trek.json | jq '.[] | .show | [.name, .network // .webChannel]'
cat star_trek.json | jq '.[] | .show | keys'
cat star_trek.json | jq '.[] | .show | premiered'
cat star_trek.json | jq '.[] | .show | .premiered'
cat star_trek.json | jq '.[] | .show | sort_by(.premiered)'
cat star_trek.json | jq '[.[] | .show] | sort_by(.premiered)'
cat star_trek.json | jq '[.[] | .show] | sort_by(.premiered) | [.name, .premiered]'
cat star_trek.json | jq '[.[] | .show] | sort_by(.premiered) | .[] | [.name, .premiered]'
cat star_trek.json | jq '[.[] | .show] | keys'
cat star_trek.json | jq '.[] | .show | keys'
cat star_trek.json | jq '.[] | .show | .status'
cat star_trek.json | jq '.[] | .show | select(.status != "Ended") | [.name, .status]'
curl http://api.tvmaze.com/search/shows\?q\=star | jq '.[].show | {name, premiered}'
cat star_trek.json| jq '.[] | select(.show.name == "Star Trek: Picard")'
cat star_trek.json| jq '.[] | select(.show.name == "Star Trek: Picard").show.premiered' -r
cat star_trek.json| jq '.[] | select(.show.name =~ "Star Trek").show.premiered' -r
cat star_trek.json| jq '.[] | select(.show.name | contains("Star Trek") | not).show | {name, type, rating, summary, genres}'
cat star_trek.json| jq '.[] | select(.show.name | contains("Star Trek") | not).show'
cat star_trek.json| jq '.[] | select(.show.name | contains("Star Trek") | not).show.name' -r
cat star_trek.json| jq '.[] | select(.show.name | contains("Star Trek")).show.name' -r
cat star_trek.json| jq '.[] | select(.show.status != "Ended")'
cat star_trek.json| jq '[.[] | select(.show.status != "Ended")] | length'
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show' -r
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show.name' -r
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show | {name, rating}' -r
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show.name'
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show | [.name, .network]'
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show | [.name, .webChannel]'
cat star_trek.json| jq '.[] | select(.show.status != "Ended") | .show | [.name, .rating]'
cat star_trek.json| jq '[.[] | select(.show.status != "Ended") | .show] | sort_by(.rating.average)'
cat star_trek.json| jq '[.[] | select(.show.status != "Ended") | .show] | sort_by(.rating.average) | .[].name'
cat star_trek.json| jq '[.[] | select(.show.status != "Ended") | .show | select(.rating.average != null)] | sort_by(.rating.average) | .[].name'
cat star_trek.json| jq '.[] | .show | [.genres, .name]\n'
cat star_trek.json| jq '.[] | .show | select(.genres | contains(["Drama"])) | .name'
curl http://api.tvmaze.com/search/shows\?q\=star | jq '.[] | .show | select(.name | contains("Star Trek")).name'
curl http://api.tvmaze.com/search/shows\?q\=star | jq '.[] | .show | keys'
curl http://api.tvmaze.com/search/shows\?q\=star | jq '.[] | .show | values'