my %hash; $hash{delete $_->{id_1}}{delete $_->{id_2}} = $_ for @aoh;