Mongodb to Find a collection Design Scheme of User Location

  mongodb, question

A user form requires the user to select the location (province, city and district), and to realize the three-level linkage of the three drop-down boxes in the province and city, how should the database be designed?
It has been implemented under SQL database, but is there a better design scheme under MongoDB?

The elements of a collection should basically be nested in three layers
{“province”:{“pname”:p1,”city”:[{“cname”:c11,”area”:[{“aname”:a11}]}]}}
{“province”:{“pname”:p2,”city”:[{“cname”:c21,”area”:[{“aname”:a21}]}]}}
{“province”:{“pname”:p3,”city”:[{“cname”:c31,”area”:[{“aname”:a31}]}]}}
When using, the name of the province is retrieved according to the provision, and then the city(array) embedded in the provision document is iterated to obtain the name, and the area(area) embedded in each city document is iterated to obtain all the area names.