def unquote_keys(data):
 if isinstance(data, dict):
  for (key, value) in data.items():
   if isinstance(value, dict):
    unquote_keys(value)
   if key.startswith('%24'):
    k = parse.unquote(key)
    data[k] = data.pop(key)
 return data

def unquote_keys ( data ) : if isinstance ( data , dict ) : for ( key , value ) in data . items ( ) : if isinstance ( value , dict ) : unquote_keys ( value ) if key . startswith ( '%24' ) : k = parse . unquote ( key ) data [ k ] = data . pop ( key ) return data
restores initial view of quoted keys in dictionary data .