http://qs321.pair.com?node_id=1228429


in reply to Merge hashes in specific format

Another approach would be to merge the JSON together then calculate the totals.
my $json1 = decode_json($raw_json1); my $json2 = decode_json($raw_json2); push @{ $json1->{whateverkey} }, @{ $json2->{whateverkey} };