{\'action_name\':\'mobile signup\',
\'functions\':[{\'name\':\'test_signUp\',
\'parameters\':{\'username\':\'max@getappcard.com\',
You might want to use a recursive function to extract all the key, value
pairs.
def extract(dict_in, dict_out):
for key, value in dict_in.iteritems():
if isinstance(value, dict): # If value itself is dictionary
extract(value, dict_out)
elif isinstance(value, unicode):
# Write to dict_out
dict_out[key] = value
return dict_out
Something of this sort. I come from C++ background so I had to google for all the syntaxes.