Nest maps into each other from a list of maps

Here is a solution to the same problem, but the flat list uses a ref to the parent, you are using a list of children.

2 Likes