Not sure how to store a tree like structure

I come from a Javascript background and I’m new to C++ and Unreal Engine so I may well be approaching this in the wrong way but my problem is as follows:

I have a class that’s loading in a number of static meshes and storing pointers to them in a TArray. I need to store these pointers in more of a structured way that basically mimics the folder structure they’re stored in. Something like this:

BuildingPieces->City->Tower01->Top->City_Tower01_Top01

BuildingPieces->Industrial->Factory04->Middle->Industrial_Factory04_Middle08

BuildingPieces->Slums->TowerBlock02->Bottom->Slums_TowerBlock02_Bottom02

etc.

I’m totally stuck as to which collection types to use and when. It seems like a combination of TArrays, TMaps and structs would maybe do it but I’m lost!

Hold pointers to UObjects;
UObjects can hold pointers to other objects, so then with them is easy to achieve the tree behavior you want.