| Author |
How can I get the values out of a Map and assign them each to their own String?(SOLVED)
|
Matt Kohanek
Village Idiot
Ranch Hand
Joined: Apr 04, 2009
Posts: 483
|
|
edited to simplify:
I have this code:
which returns this:
no coordinates for this device
no coordinates for this device
{lng=20, lat=20}
no coordinates for this device
so as you can see my third device is the only one that has coordinates.
Now I need to take those values lng and lat, and assign them each to a String. So
String lng="20";
and
String lat="20"
but I cannot figure out how.
Ive tried things like String lat=x.get(0); but this returns a null value.
So how can I take the two values that are in my Map x, and assign them each to their own String?
solution
I needed to do x.get("lng"), not x.get(lng)
woohoo
|
True wisdom is in knowing you know nothing - Socrates
|
 |
Matt Kohanek
Village Idiot
Ranch Hand
Joined: Apr 04, 2009
Posts: 483
|
|
|
edited out solved
|
 |
 |
|
|
subject: How can I get the values out of a Map and assign them each to their own String?(SOLVED)
|
|
|