JSONArray historyJson = new JSONArray(nameHistoryResponse);
for (Object o : historyJson) {
index++;
JSONObject jsonObj = (JSONObject) o;
String name = jsonObj.getString("name");
if (name.equalsIgnoreCase(data[2].toString())) {
foundIndex = index;
}
}
I keep getting an error on line two, saying that historyJson must be "java.lang.Iterable" but according to my code it is. Im completely stumped it would mean the world if someone had a fix for this as the project needs to be done within the next 2 hours.