Parsing Multiple Json Strings
I would like to thank all the users in this community for helping me get as far as I am in my project today. I now need your help once again. So far, I am able to establish a conn
Solution 1:
You can get it all by doing the following:
String firstname = json.getString("firstName");
String lastname = json.getString("lastName");
int checkedIn = json.getInt("checkedIn");
int updated = json.getInt("checkedindatetime");
JSONObject address = json.getJSONObject("address");
String streetaddress = address.getString("streetAddress");
String city = address.getString("city");
etc...
JSONArray phoneNumbers = json.getJSONArray("phoneNumber");
Stringtype = phoneNumbers.getJSONObject(0).getString("type");
etc...
Hope this helps.
A good resource for looking at json, is this validator.
Post a Comment for "Parsing Multiple Json Strings"