bigup401 has asked for the wisdom of the Perl Monks concerning the following question:
how can i parse array in json::xs i can parse hash but failed to access arrays
$data = $responde->{data}; $data_info = $responde->{data_info}->{info};
print $data; #prints status print $data_info; #prints user
how can i access names, age, location, country, email
{ "data" : "status", "data_info" : { "info" : "user", "del_info" : [ { "names" : "john doe", "age" : 28, "location" : [ { "country" : "ca", } ], "email" : [ "john@email.com" ], "cf" : 1.0, "pr" : null } ] } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: json::xs arrays
by choroba (Cardinal) on Mar 29, 2017 at 13:25 UTC | |
by bigup401 (Pilgrim) on Mar 29, 2017 at 14:19 UTC | |
by AnomalousMonk (Archbishop) on Mar 29, 2017 at 15:05 UTC | |
|
Re: json::xs arrays
by NetWallah (Canon) on Mar 29, 2017 at 14:09 UTC | |
by bigup401 (Pilgrim) on Mar 29, 2017 at 15:24 UTC | |
by NetWallah (Canon) on Mar 29, 2017 at 17:39 UTC | |
by bigup401 (Pilgrim) on Mar 29, 2017 at 17:57 UTC | |
by NetWallah (Canon) on Mar 30, 2017 at 14:20 UTC |