jq
·1 min
Personal jq
expression language reference
- create custom output with string interpolation from array of objects
.[] | "\(.var1) \(.var2)"
- count number of elements in array
.[] | length
- loop an array and run command for each element
jq -c '.[]' input.json | while read i; do
done