n = ''
resul = {}
def flatten(dictionary):
global n, resul
for key, value in dictionary.items():
if len(value) < 1:
resul[n + key] = ''
if type(value) == type(dict()):
n += key + '/'
flatten(value)
else:
resul[n + key] = value
n = ''
return resul
Created at: 2022/11/09 09:30; Updated at: 2022/11/10 12:57