I have the following arrays in php
$api = array(
'PlnDir' => $PlnDir,
'Agr' => $Agr,
'Emp' => $Emp,
'Admin' => $Admin
);
$datos = array(
'menuPV' => $menuPrincipal,
'menuSH' => $menuSecundario,
'api' => $api
);
$json = json_encode($datos);
In js I do the following
objJson = JSON.parse(json);
If I want to access the first variable 'menuPV' I do it in the following way
objJson.menuPV
How could I traverse the array api which in turn is an element of the data array from javascript?