my $data = decode_json( $json ); my $definition= $data->{'myData'}; my @definition=@$definition; print Dumper \@definition; #trying to access the data structure with: foreach my $record (@definition) { print $record->{Lang4}; } #### while (my $row = $sth->fetchrow_hashref) { push @definition, $row; } print objToJson( { myData => \@definition} );