Praful C
Praful C

Reputation: 172

How to take values from List<List<HashMap<String, String>>>

I want to take Latlong values stored in Hash map as key value pairs.

List<List<HashMap<String, String>>> routes

'routes' hold the values. I want to get those values

structure

Upvotes: 1

Views: 122

Answers (1)

Blundell
Blundell

Reputation: 76458

If you break it down into the parts so you understand it:

List<HashMap<String, String>> route = routes.get(0);
HashMap<String, String> position = route.get(0);
String latitude = position.get("lat");
String longitude = position.get("lng");

Upvotes: 3

Related Questions