I have a set of hierarchical data to store, the hierarchy is like site/building/floor, the data, for example
{
site:'New York',
buildings: [
{
name:'building a',
floors: [
'Ground':[{room:room1},{room:room2}],
'First':[{room:room1},{room:room2}]
]
}
]
},
{
site:'London',
buildings: [
{
name:'building a',
floors: [
'Ground':[{room:room1},{room:room2}],
'First':[{room:room1},{room:room2}]
]
}
]
}
I want to store these room data into a set, but I can also query the a subset of rooms by selecting the site name or (site name + building name ) or ( site name + building name + floor )