Merkle tree to address: amount map
Select the key containing merkle proofs and amounts. to_entries[]
returns objects on new lines instead of in an array, so wrap the statement in [()]
to make it an array again. For each entry, map the amount to the address key. Merge back in to one big object with add
.
jq '.recipients | [(to_entries[] | {(.key): .value.amount})] | add' results.json