Hello,
I have a project in which I have a list of elements where
some elements are nested as follows:

I am struggling to figure out a way to print out all my
components and subcomponents in an M2Doc report, in a structured way. For example, I would like to print the list above into an M2Doc report with the following structure:
- Component 1
- Subcomponent 1
- Subcomponent 2
- Subcomponent 3
- Subcomponent 4
- Component 2
- Subcomponent 5
I was wondering if you guys have come across this before
and have example to share.
Many thanks,
Lucas