Request: total price of in-stock items only
Input:
price: 10
stock: 5
price: 20
stock: 0
price: 5
stock: 2
jq program: [.[] | select(.stock > 0) | .price] | add
Output:
15