I'd like to use orgChart.js 
(https://github.com/dabeng/OrgChart/tree/master/demo) which expects 
properly formed json dictionaries, nested if there are dictionaries within 
dictionaries. 

But my data is in parent child record format. 

Is there a method for creating nested json that represents, for example, a 
taxonomy such as at http://wwwendt.de/tech/fancytree/demo/taxonomy-browser/?

FancyTree.js supports loading flat, parent referencing tables but orgChart 
expects data to look like:

{
      'name': 'Lao Lao',
      'title': 'general manager',
      'children': [
        { 'name': 'Bo Miao', 'title': 'department manager' },
        { 'name': 'Su Miao', 'title': 'department manager',
          'children': [
            { 'name': 'Tie Hua', 'title': 'senior engineer' },
            { 'name': 'Hei Hei', 'title': 'senior engineer' }
          ]
        },
        { 'name': 'Hong Miao', 'title': 'department manager' },
        { 'name': 'Chun Miao', 'title': 'department manager' }
      ]
    };

Could Pandas be used to convert the data?

thanks,

Alex Glaros

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to