my $out1 = [ grep { ! $seen1{ $_->{ID} }++ } @in ];