Populate nested array with unknown depth in mongoose?

Like the question says. I have a deeply nested array, but the depth is not known to me. User can add how much ever nested array inside the array. Also, this array belongs to a different collection. For eg: region collection. Region can have multiple regions nested, and so on. The parent regions are in a different collection called Property. Its like a tree with property as head, and everything below it. So I have to populate property with all these nested regions. Is making a seperate collection for regions and properties a good choice at all? If so, how do I go about this?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.