Request: total revenue per customer
Input:
customer: A
total: 10
customer: B
total: 5
customer: A
total: 7
jq program: group_by(.customer) | map({customer: .[0].customer, total: (map(.total) | add)})
Output:
customer: A
total: 17
customer: B
total: 5