PalTech interview question

6. Merge the array inside the objects,