Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Map<String, String>> eventList = new ArrayList<Map<String, String>>();
- try
- {
- JSONObject jsonResponse = new JSONObject(jsonResult);
- JSONArray jsonMainNode = jsonResponse.optJSONArray("event_list");
- // get all of the records returned from the query
- for (int i = 0; i < jsonMainNode.length(); i++)
- {
- JSONObject jsonChildNode = jsonMainNode.getJSONObject(i);
- String title = jsonChildNode.optString("title"); //get the event title from the result set
- eventList.add(createEvent("Event", title)); //add a new event to the list with its title
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement