I have three collections.
SalaryCollection
BonusCollection
Deduction Collection
All of them have date which is common in some of them. I want to merge these three into one collection in a way that object with same date in three becomes one as a result. Something like this:
#items:array:2[
0=>{
+"date":"1-2020"
+"salaries":36500.0
+"deductions":1500.0
+"bonuses":7000.0
}
1=>{
+"date":"2-2020"
+"salaries":20000.0
+"deductions":1000.0
+"bonuses":5000.0
}
]
How can i do it?