I have json data which I get from fortigate firewall using api, the data is json data, I want to go through this data and get some info from it. this is the data which I get
array(10) {
["http_method"]=>
string(3) "GET"
["results"]=>
array(2) {
[0]=>
array(14) {
["type"]=>
string(10) "auth_logon"
["username"]=>
string(5) "mihai"
["usergroup"]=>
array(1) {
[0]=>
string(5) "mihai"
}
["id"]=>
int(0)
["duration"]=>
string(11) "123 seconds"
["duration_secs"]=>
int(123)
["auth_type"]=>
int(3)
["ipaddr"]=>
string(10) "10.10.80.1"
["src_type"]=>
string(3) "ip4"
["expiry"]=>
string(13) "28799 seconds"
["expiry_secs"]=>
int(28799)
["traffic_vol"]=>
string(12) "323318 bytes"
["traffic_vol_bytes"]=>
int(323318)
["method"]=>
string(8) "Firewall"
}
[1]=>
array(14) {
["type"]=>
string(10) "auth_logon"
["username"]=>
string(9) "testicafe"
["usergroup"]=>
array(1) {
[0]=>
string(9) "testicafe"
}
["id"]=>
int(0)
["duration"]=>
string(11) "182 seconds"
["duration_secs"]=>
int(182)
["auth_type"]=>
int(3)
["ipaddr"]=>
string(10) "10.10.80.2"
["src_type"]=>
string(3) "ip4"
["expiry"]=>
string(13) "28799 seconds"
["expiry_secs"]=>
int(28799)
["traffic_vol"]=>
string(12) "274990 bytes"
["traffic_vol_bytes"]=>
int(274990)
["method"]=>
string(8) "Firewall"
}
}
["vdom"]=>
string(4) "root"
["path"]=>
string(4) "user"
["name"]=>
string(8) "firewall"
["action"]=>
string(6) "select"
["status"]=>
string(7) "success"
["serial"]=>
string(16) "FG201E4Q17902047"
["version"]=>
string(6) "v5.6.9"
["build"]=>
int(1673)
}
I want to go through this data and retrieve some info like username ,ipaddr and traffic_vol_bytes ,what should I do to get it