I have following collection:
array:2 [▼
0 => array:21 [▼
"id" => 1
"referrer" => "Kariane Muller DVM"
"path" => null
"tracking_code_id" => 30
"sales" => 2
"field_name" => "ssn"
"income" => 4.0
"fsId" => "1b5e4434-da5a-342e-9b87-df9791b1bcc1"
]
2 => array:21 [▼
"id" => 1
"referrer" => "Kariane Muller DVM"
"path" => null
"tracking_code_id" => 30
"sales" => 1
"field_name" => "income"
"income" => 1.0
"fsId" => "1b5e4434-da5a-342e-9b87-df9791b1bcc1"
]
For visibility purposes I have converted it to array.
How can I collapse this collection into one collection, but I want to
sum
the income
keys into one in final collection.
Other keys should be included as they are ?