def _unwrap_dict(dictionary, index_string):
 index = index_string.split(',')
 for k in index:
  dictionary = dictionary[k]
 return dictionary

def _unwrap_dict ( dictionary , index_string ) : index = index_string . split ( ',' ) for k in index : dictionary = dictionary [ k ] return dictionary
accepts index in form of a string returns final value example: dictionary = {a: {b: {c: foobar}}} index_string = a .