For this you can use a list view containing another list view.
Below left side is a datagrid. right side is a list view version
Creating the 2nd level object, you will need to create an association to the 1st level object.
In Studio Pro it looks like this for the first level
Second level is similar, but retrieving from the database via the association
I only used one entity,
but of course you can do the same with multiple entities that have 1-* associations.
To learn more about nesting data, you can take a look at this section of the rapid developer learning path
https://academy.mendix.com/link/modules/93/lectures/704/5.4-Nested-Data
Hope this answers you question