I am doing some API queries using Perl and using Data::Dumper to print the contents and hopefully assign several keys as variables.
$client->request( "GET", "interfaces/detail", $opts );
my $out = decode_json $client->responseContent();
print Dumper $out;
However, I am unable to print a specific key's (b4) output or define it as a variable.
print $out{'b4'};
I think that this is due to the nested data structure of HASH/ARRAY/HASH/HASH/Key=>Value in JSON format.
DB<1> x $out
0 HASH(0x493f290)
'data' => ARRAY(0x494e2e0)
0 HASH(0x4475160)
'a1' => '11'
'a2' => '12'
'a3' => '13'
'a4' => HASH(0x494e560)
'b1' => '21'
'b2' => 22
'b3' => '23'
'b4' => '24'
'b5' => '25'
'b6' => '26'
'b7' => '27'
'a5' => '14'
How can I obtain the value "24" from the referenced layout?