Suppose I have a list of a list of dictionaries.
I'm pretty sure Python has a nice and short way (without writing 2 for loops) to retrieve the value associated with the key. (Every dictionary has a key).
How can I do this?
Edit : There is a sample (JSON representation) of the input
[
[
{
"lat": 45.1845931,
"lgt": 5.7316984,
"name": "Chavant",
"sens": "",
"line" : [],
"stationID" : ""
},
{
"lat": 45.1845898,
"lgt": 5.731746,
"name": "Chavant",
"sens": "",
"line" : [],
"stationID" : ""
}
],
[
{
"lat": 45.1868233,
"lgt": 5.7565727,
"name": "Neyrpic - Belledonne",
"sens": "",
"line" : [],
"stationID" : ""
},
{
"lat": 45.1867322,
"lgt": 5.7568569,
"name": "Neyrpic - Belledonne",
"sens": "",
"line" : [],
"stationID" : ""
}
]
]
As output I'd like to have a list of names.
PS: Data under ODBL.