How to flatten data of mongodb when it's array of nested object and populated

please help me at least show some example