in reply to Iterate over complex JSON

nested data structure work with references and you need to dereference them explicitely in Perl.

please try (untested)

my $service = $config->{'services'}; foreach $oneservice (@$service){ print $oneservice->{'service'}; }

see perlref for details about references and perldsc for nested data structures

HTH! :)

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

Replies are listed 'Best First'.
Re^2: Iterate over complex JSON
by Northwood128 (Initiate) on Nov 24, 2014 at 19:20 UTC
    I'll try this. Thanks!! :)