'Mongoose, Manage Multidimension Array

Is it possible to save this kind of multidimensional array in mongodb? I want it to be something this kind of hierarchy

Country City Town House

countries =[
            [ //Country_1

                [ //City_1

                        [ //town_1
                            [/*house_1*/],
                        ],

                        [//town_2
                            [/*house_1*/],
                        ], 

                ]

            ], //end of Country_1

            [ //Country_2

                [ //City_1 ]

            ], //end of Country_2
        
        ];

and update it for some times?

like for example i like to add a new first_layer_3

or

Be able to update and add to Country_1 > City_1 > Town_1 > Add a House

I am open for other way to work this out, pls feel free to suggest and comment things.. THANKS ALOT IN ADVANCE.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source