You are looking at the key when what you want is the value:
foreach my $key (keys %$decodedJSON) { if (is_hashref($key)) { ...
Most likely you wanted:
foreach my $key (keys %$decodedJSON) { my $val = $decodedJSON->{ $key }; if (is_hashref($val)) { ...
In reply to Re: Parsing the data returned from the companies house API
by Corion
in thread Parsing the data returned from the companies house API
by irtuk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |