Using python, how can I take sample set of json data below, and organize it into an array or list of some sort? The reason I want to do this is so I can then more easily loop through this variable recursively and create a treeview with parent/child relationships.
I'm mainly looking for help on how I would create a nested dictionary out of my json data.
Pseudo Goal
'Studio Tools'
'Modeling'
'C:/Users/jmartini/Desktop/Trash/submitters/run.ms'
'C:/Users/jmartini/Projects/tinichest_simple/someTools\\CreateSphere.py'
'Sculpting'
'C:/Users/jmartini/Projects/tinichest_simple/someTools\\Exporter.py'
'Lighting'
'C:/Users/jmartini/Projects/tinichest_simple/someTools/Mover.ms'
'C:/Users/jmartini/Projects/tinichest_simple/someTools\\DemoTest.py'
JSON EXAMPLE
files =[
{
'category':[
'Studio Tools',
'Modeling'
],
'file':'C:/Users/jmartini/Desktop/Trash/submitters/run.ms'
},
{
'category':[
'Studio Tools',
'Lighting'
],
'file':'C:/Users/jmartini/Projects/tinichest_simple/someTools/Mover.ms'
},
{
'category':[
'Studio Tools',
'Modeling'
],
'file':'C:/Users/jmartini/Projects/tinichest_simple/someTools\\CreateSphere.py'
},
{
'category':[
'Studio Tools',
'Lighting'
],
'file':'C:/Users/jmartini/Projects/tinichest_simple/someTools\\DemoTest.py'
},
{
'category':[
'Studio Tools',
'Modeling',
'Sculpting'
],
'file':'C:/Users/jmartini/Projects/tinichest_simple/someTools\\Exporter.py'
}
]