in reply to reading special parts of a JSON File

Your question is a bit confusing, but from what I understand you want to use keys:

my $instances_hash = $data->{'local'}->{'tomcat'}->{'instances'}; my @names = keys %$instances_hash; for my $name (@names) { print "The name is $name\n"; }

Replies are listed 'Best First'.
Re^2: reading special parts of a JSON File
by Furkan (Novice) on Sep 18, 2017 at 09:51 UTC
    Thank you very much! Thanks to you I figured out how to solve my problem, thanks a lot!
Re^2: reading special parts of a JSON File
by Furkan (Novice) on Sep 18, 2017 at 09:32 UTC
    I'm sorry that my question is confusing. I want to get the instance name (which is in "instance_name") and safe it into a variable for further uses. I'll try your idea, thank you!