[Solved] JSONArray equivalent to JSONObject’s .has() method?


Try this:

JSONArray array;
for(int i = 0; i < array.length(); i++){
    JSONObject json = array.getJSONObject(i);

    if (json.has("errors")){
        //magic
    }
}

solved JSONArray equivalent to JSONObject’s .has() method?