} elsif ( $format eq 'key_distinct' ) {
my $found;
- $json->{rows} = [ grep { $found->{ $_->{key} }++ == 1 } @{ $json->{rows} } ];
+ $json->{rows} = [ grep { ++$found->{ $_->{key} } == 1 } @{ $json->{rows} } ];
$json->{distinct_rows} = scalar @{ $json->{rows} };
warn "## distinct stats ", dump( $found );