« first day (1808 days earlier)      last day (1558 days later) » 

4:10 PM
@Vasilis Here's how this could have been better presented. Assuming you did attempt giving us the correct data, a MCVE could look as follows:
obj =  {'List': [{'meeting': {'week': 1, 'timing': '09:00'},
'Left': True,
'NestedPart': [{'delivery': {'day': 2, 'time': '05:00'},
'code': '123'},
{'collection': {'day': 1, 'time': '15:00'},
'code': '567'}],
'code2': '123'}], } #note that i removed the ...
#now obj can actually be assigned and the code will run without errors.
#This allows people to run the code and reason with it.
And given a setup like this, here's how you could go about figuring out what's actually available in the data that you're dealing with.
 
Even so, it doesn't show the code that tries to process it
 
#see the output of every single line one by one,
# do not advance further till you understand what's going on
print(type(obj))
print(obj.keys())
obj['List']
print(type(obj['List']))
print(len(obj['List']))
obj['List'][0]
print(type(obj['List'][0]))
print(obj['List'][0].keys())
obj['List'][0]['NestedPart']
print(type(obj['List'][0]['NestedPart']))
print(len(obj['List'][0]['NestedPart']))
obj['List'][0]['NestedPart'][0]
print(type(obj['List'][0]['NestedPart'][0]))
print(obj['List'][0]['NestedPart'][0].keys())
 
5 messages moved from Python
 

« first day (1808 days earlier)      last day (1558 days later) »