Json To Array List Conversion
Below is my json code, I can't convert it to arraylist: {'location':[{'place_name':'Arabian Ranches ,Dubai Land'},{'place_name':'The Greens & The Views ,Emirates Living'},{'pla
Solution 1:
in here location is a JsonArray object. so use an integer variable for access data from it :)
ArrayList<String> data=newArrayList<String>();
for(int i=0;i<location.length();i++){
JSONObject arrayElement=location.getJSONObject(i);
data.add(arrayElement.getString("place_name"));
Log.i("json",data.get(i));
}
Post a Comment for "Json To Array List Conversion"