Importing from JSON
can get very complex and nested structures.
For example:
{u\'body\': [{u\'declarations\': [{u\'id\': {u\'name\': u\'i\',
If you only need to walk the dictionary, I'd suggest using a recursive walk
function that takes a dictionary and then recursively walks through its elements. Something like this:
def walk(node):
for key, item in node.items():
if item is a collection:
walk(item)
else:
It is a leaf, do your thing
If you also want to search for elements, or query several elements that pass certain criteria, have a look at the jsonpath module.