mr007619 has asked for the wisdom of the Perl Monks concerning the following question:
So I'm having an issue with interpreting JSON data and documentation I've been reading has me admittedly confused and it seems like this is a pretty much a newbie/trivial question. Below is my code and the issue I'm having:
$request = HTTP::Request->new(GET => 'https://xxxx'); $ua = LWP::UserAgent->new; $response = $ua->request($request); $decodejs = decode_json $response->content; print Dumper $decodejs;
The output of this gives me something like this:
$VAR1 = {
'lbvserver' => [
{,
'name' => 'name1',
'ipv46' => '192.168.1.1',
},
{
'name' => 'name2',
'ipv46' => '10.1.1.1',
} and so on.
I'm trying to directly grab name and IP values as an instance and having the worst time figuring out the correct way to do it. Any help or direct reference to a page I should be reading would be greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Attempting to interpret JSON data
by moritz (Cardinal) on May 16, 2012 at 19:47 UTC | |
by mr007619 (Novice) on May 16, 2012 at 20:24 UTC | |
by mr007619 (Novice) on May 16, 2012 at 21:36 UTC | |
by Eliya (Vicar) on May 16, 2012 at 22:10 UTC | |
by mr007619 (Novice) on May 16, 2012 at 23:21 UTC | |
|
Re: Attempting to interpret JSON data
by Anonymous Monk on May 16, 2012 at 19:51 UTC |