Suppose:
Folder
  - Document
  - Document
  - Folder1
    - Document
    - Document
If I do a portal_catalog using Folder as path, I get:
[<Products.ZCatalog.Catalog.mybrains object at 0xdba8d9c>, 
<Products.ZCatalog.Catalog.mybrains object at 0xdd71234>, 
<Products.ZCatalog.Catalog.mybrains object at 0xdd71324>, 
<Products.ZCatalog.Catalog.mybrains object at 0xdd712fc>, 
<Products.ZCatalog.Catalog.mybrains object at 0xdd71194>]
But I would like to have a portal_catalog that keeps the hierarchical context, like:
{
    "Folder": 
             [
             <Products.ZCatalog.Catalog.mybrains object at 0xdba8d9c>,
<Products.ZCatalog.Catalog.mybrains object at 0xdba8d9c>, 
              {
               "Folder1":[
                          <Products.ZCatalog.Catalog.mybrains object at 0xdba8d9c>, <Products.ZCatalog.Catalog.mybrains object at 0xdba8d9c>
                         ]
              }
             ]
}
So, if it's a folderish type, it's id is a key from a dict.
Is is possible to have a similar data strcuture (that keeps the object's hierarchical structure), or will I have to create my own recursive function (I know the structure above will possibly don't exist, but I think you can get the idea)? I'm thinking about using portal_catalog and brains because of performace issues.
Thanks!