I\'ve an array as follows named $test_package_data. For the reference I\'m printing first two elements of it:
$test_package_data
Array ( [0] => Array
Try this:
foreach($array as $k => $obj) { $obj->{'newKey'} = "value"; }