Group by field

Count records grouped by status field

jq 'group_by(.status) | map({status: .[0].status, count: length})' data.json

tool
jq17 commands
tags
jq

More jq commands

all 17 jq commands