I have a folowing JSON file:
{"ver":2,"sb":[some array],"ld":[some array] ,"hd":[some array]}
I try to ger property names with next code:
$path='./datafiles/jsonTest.json';
$data = json_decode(file_get_contents($path));
$properties=get_object_vars($data);
foreach($properties as $propName){
echo $propName.'<br>';
}
but as result I get:
2
Array
Array
Array
when I need:
'ver'
'sb'
'ld'
'hd'
Can someone help me? Thanks!