-
Notifications
You must be signed in to change notification settings - Fork 6
jq recipes
Anonymous edited this page Jan 6, 2013
·
2 revisions
Examples to work with jq.
#show only product keys
veye search json --format=json | jq '.[] | .prod_key'
#show only package name and product's key
veye search json --format=json | jq '.[] | {name,prod_key}'
#turn response to csv
veye search json --format=json | jq '.[] | "\(.name), \(.prod_key)"'
#show only Java projects
veye search json --format=json | jq '.[] | select(.language == "Java")'
#show products and length of product name
veye search json --format=json | jq -c '.[] | .name | [., length] '
veye search json --format=json | jq -c '.[] | [{name: (.name) ,len: (.name | length)}]'