my @results; my $hr = $ST->fetchrow_arrayref; for my $key (@{$ST->{NAME_lc}}) { push @results, { name=>$key, value=>$hr->{$key} }; }