Denny Huang says to YSITD
總覺得這串鬼東西可以再精簡 可是我懶得改了 [.data.records[] | select(.packId == "52") | {(.rollType): .rollCount} | to_entries[]] | reduce(.[]) as {$key, $value} ({}; .[$key] += $value)