Reputation: 1683
I have an object/list coming from parse.com(using parse sdk) and receive both strings and numbers. While I am able to fetch strings I don't know how to fetch numbers.
This works fine for string as driver:
ParseObject u = (ParseObject)scoreList.get(i);
String truckName;
truckName = u.getString("driver").toString();
How do I get the number assuming my "xcor" (assume another property such as "driver") is a number not string.
Upvotes: 0
Views: 86
Reputation: 31448
Maybe I don't understand your question perfectly, but isn't this:
double xcor = u.getDouble("xcor");
just what you need?
(alternatively if you store integer instead of a double you can use int otherVariable = u.getInt("otherVariable");
)
Upvotes: 1