Request: sum of amount only for pending transactions
Input:
amount: 10
pending: yes
amount: 5
pending: no
amount: 8
pending: yes
jq program: [.[] | select(.pending) | .amount] | add
Output:
18