This is part of the bigger data set but if the code works I'm sure I could apply it to the entire data set. Here's the data sample I am working with.
data = [
{
'listing_id': '1133718',
'survey_id': '1280',
'host_id': '6219420',
'room_type': 'Shared room',
'country': '',
'city': 'Singapore',
'borough': '',
'neighborhood': 'MK03',
'reviews': 9.0,
'overall_satisfaction': 4.5,
'accommodates': '12',
'bedrooms': '1.0',
'bathrooms': '',
'price': 74.0,
'minstay': '',
'last_modified': '2017-05-17 09:10:25.431659',
'latitude': 1.293354,
'longitude': 103.769226,
'location': '0101000020E6100000E84EB0FF3AF159409C69C2F693B1F43F'
},
{
'listing_id': '1196810',
'survey_id': '1280',
'host_id': '6236420',
'room_type': 'Shared room',
'country': '',
'city': 'Singapore',
'borough': '',
'neighborhood': 'MK11',
'reviews': 9.0,
'overall_satisfaction': 3.5,
'accommodates': '11',
'bedrooms': '2.0',
'bathrooms': '',
'price': 84.0,
'minstay': '',
'last_modified': '2017-05-17 09:10:25.431659',
'latitude': 1.34567,
'longitude': 103.769226,
'location': '0101000020E6100000E84EB0FF3AF159409C69C2F693B1F43F'
}
.
.
.
]
If the function works, I want to trigger a function like:
get_all_latitude(data, ['1196810', '1133718'])
with the expected output:
[1.34567, 1.293354]