I am trying to extract the arrival time values from the following, which appears to be a list of dictionaries:
[{'arrival': {'time': 1508791028L},
'departure': {'time': 1508791028L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508790596L},
'departure': {'time': 1508790596L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508791744L},
'departure': {'time': 1508791744L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508792223L},
'departure': {'time': 1508792223L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508793450L},
'departure': {'time': 1508793450L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508792591L},
'departure': {'time': 1508792591L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508794110L},
'departure': {'time': 1508794110L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508794740L},
'departure': {'time': 1508794740L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508788421L},
'departure': {'time': 1508788421L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508788919L},
'departure': {'time': 1508788919L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508789417L},
'departure': {'time': 1508789417L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508790287L},
'departure': {'time': 1508790287L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508790347L},
'departure': {'time': 1508790347L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508791330L},
'departure': {'time': 1508791330L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508791799L},
'departure': {'time': 1508791799L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508792447L},
'departure': {'time': 1508792447L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508793300L},
'departure': {'time': 1508793300L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508793840L},
'departure': {'time': 1508793840L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508794380L},
'departure': {'time': 1508794380L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508794800L},
'departure': {'time': 1508794800L},
'schedule_relationship': 0,
'stop_id': u'D03N'},
{'arrival': {'time': 1508795220L},
'departure': {'time': 1508795220L},
'schedule_relationship': 0,
'stop_id': u'D03N'}]
However, when I started to try and understand the structure of the list with a simple:
for i in in_dict:
print i
print "************************"
I got an output like this:
[{'arrival': {'time': 1508791028L},
************************
'departure': {'time': 1508791028L},
************************
'schedule_relationship': 0,
************************
'stop_id': u'D03N'},
************************
{'arrival': {'time': 1508790596L},
************************
'departure': {'time': 1508790596L},
That output suggests to me that the elements in the list are possibly not really dictionaries (for example "{'arrival': {'time': 1508790596L}" seems like it needs another "}" to be structured correctly).
My primary question is what is the best way to extract the arrival times from this data? My secondary question is, is this actually a list of dictionaries or just a list of items that happen to share a resemblance with a list of dictionaries?