for (var element in myobj.mac.users) {
console.log(myobj.mac.users[element].name);
}
foreach ($myobj['mac']['users'] as $element) {
echo $element['name'];
}
$myobj = '{
"mac":{
"users":[{"id":1,"name":"user_Slon"},{"id":2,"name":"skypidar"},{"id":3,"name":"akakii"},{"id":4,"name":"slon"}]
}
}';
$myobj = json_decode($myobj, TRUE);
foreach ($myobj['mac']['users'] as $element) {
echo $element['name'];
}