diff --git a/scripts/tricount_sum.jq b/scripts/tricount_sum.jq new file mode 100644 index 0000000..24eba9f --- /dev/null +++ b/scripts/tricount_sum.jq @@ -0,0 +1,6 @@ +.bills as $bills +| [ $bills[].alloc[] ] | group_by(.ower.name) +| [ .[] | .[0].ower.name as $ower + | { $ower: [ .[].amount, ($bills[] | select(.payed_by.name == $ower) | -.amount) ] | add } + ] +| add