I've got an JSON array, and I would like to select the data from it. I would like to get all subjects, but I don't know how to do it.
Code:
JSONObject jsonObject = new JSONObject(thatarray);
JSONArray jsonArray = jsonObject.getJSONArray("response");
int arrSize = jsonArray.length();
List<Integer> sub = new ArrayList<Integer>(arrSize);
for (int i = 0; i < arrSize; ++i) {
jsonObject = jsonArray.getJSONObject(i);
System.out.println("Output: " + jsonObject.toString());
}