public ArrayList<NotificationListObject> parseNotificationJSONObject(JSONObject jsonObject) throws JSONException { ArrayList<NotificationListObject> menuObjectArrayList = new ArrayList<NotificationListObject>(); Iterator<?> i = jsonObject.keys(); while (i.hasNext()) { String key = (String) i.next(); JSONObject js = jsonObject.getJSONObject(key); NotificationListObject m = new NotificationListObject(); m.setChannelId(js.getString("id")); m.setTitle(js.getString("title")); m.setOrder(js.getInt("order")); // Log.d("Key", key); menuObjectArrayList.add(m); } return menuObjectArrayList; }