I would like remove key [Properties] from array like below
I have it:
Array(
[Values] => 1
[List] => Array(
[Product] => Array(
[Details] => Array(
[Properties] => Array(
[Id] => 1
)
)
)
)
)
And I would like to remove [properties] :
Array(
[Values] => 1
[List] => Array(
[Product] => Array(
[Details] => Array(
[ID] => 1
)
)
)
)
I tried:
$result = array_map(function($sub) { return $sub['Properties']; }, $array);
and
$array= array_column($array, 'Properties');
Unfortunately it doesn't work. How can I do this ?
unset()as inunset($myarray['properties'])