i wan to get values from a json string that looks like that in my java programm: {"2":["1.1.9.1","abc","1398422038"],"1":["75.224.11.33","test","1398384362"],"0":["125.234.22.33","test","1398382882"],"_size":3}
I tried it like that:
int length = result.optInt("_size");
for (int i = 0; i < length; i++) {
JSONArray result2 = result.getJSONArray(String.valueOf(i));
IPBans.addBan(result2.getString(0),
result2.getString(1),
result2.getString(3));
}
But it does not work. result is the JSONObject.