How to flatten nested array.

Share the expected results. It is not clear from the description what you want.