Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 634 Bytes

jq-cheat_sheet.md

File metadata and controls

17 lines (15 loc) · 634 Bytes

Useful commands

curl <link> | jq '.'
cat <filename>.json | jq '.'
cat <filename>.json | jq '.[] | { message: .commit.message, name: .commit.committer.name}'
cat <filename>.json | jq '[.[] | { message: .commit.message, name: .commit.committer.name}]'
cat <filename>.json | jq '[.[] | { message: .commit.message, name: \
               .commit.committer.name, parent: [.parents[].html_url]}]'
cat <filename>.json | jq '.id'
cat <filename>.json | jq '.name.first'
cat <filename>.json | jq '.id.fec[-1]'
cat <filename>.json | jq '.terms[0].start'

Reference

jq download