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.
In reply to Attempting to interpret JSON data by mr007619
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |