Group by field jq

Count records grouped by status field

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