The webpage I'm developing retrieves (product) information from the database via an ajax call to a php file. Given the array structure and related json encoded nested string in the simplified php file below, how to define the corresponding nested array in javascript in an elegant way?
I looked at the examples such as in JS nested arrays, but still get stuck...
php code:
$productinfo = array();
$productinfo['supplierA']['agreementX']['productY']['productpropertyZ'] = 'valueProductproperty';
echo json_encode($productinfo);
;
at the end of the first line. – user1389596 Dec 30 '13 at 17:25