I have a JSON object such that:
zt123
zt3653
zt777 ..etc.
I tried the following but think I am over-complicating this. Is there a simplified way?
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