I need some help restructuring an array that I get from an API. The current format is hard for me to work with so I want to change it for something more workable.
I have the following array:
[
'attributes' => [
['attribute' => 'Healing', 'modifier' => 179],
['attribute' => 'Toughness', 'modifier' => 128],
['attribute' => 'ConditionDamage', 'modifier' => 179],
]
]
and I want to turn it into this:
[
'attributes' => [
'Healing' => 179,
'Toughness' => 128,
'ConditionDamage' => 179,
]
]