for(int i = 0; i < ja.length(); i++){
JSONObject jo = ja.getJSONObject(i);
Resources.show(jo);
}
In the above code I want to fetch the json object from json array. But I'm getting an error
org.json.JSONException: JSONArray[0] is not a JSONObject.
at org.json.JSONArray.getJSONObject(JSONArray.java:343)
at webutilities.Try.main(JSON.java:50)
BUILD SUCCESSFUL (total time: 0 seconds)
What else are the methods to fetch a json object from json array.