Spaces:
Sleeping
Sleeping
File size: 422 Bytes
729630a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
def get_hash(array):
hash = {}
for screen in array:
for key, value in screen.items():
if key not in hash:
if key == "component":
hash[key] = {}
else: hash[key] = []
if key == "component":
hash[key][screen["name"]] = value
else:
hash[key].append(value)
return hash |