how to get the object name? e.g: “XXX.HOSTNAME”
$json = '{
"XXX.HOSTNAME": {
"IP": "123.195.214.93",
"IP6": "",
"DOCUMENT_ROOT": "/home/public_html/",
"U_DISK": "154",
"U_BANDWIDTH": "0",
"TPL": "default",
"ALIAS": "www.org",
"STATS": "",
"STATS_USER": "",
"SSL": "yes",
"SSL_HOME": "same",
"LETSENCRYPT": "yes",
"FTP_USER": "",
"FTP_PATH": "",
"AUTH_USER": "",
"BACKEND": "default",
"PROXY": "default",
"PROXY_EXT": "jpeg,m4v,mkv,mov,mpeg,mpg,wmv,exe",
"SUSPENDED": "no",
"TIME": "15:56:54",
"DATE": "2023-03-04"
}
}';
php beginner,I can get the subordinate properties, but I don't know how to get the name of the object ... ...
array_key_first(json_decode($json, true));3v4l.org/sf3CP