I am trying to get a single string from a JSON response.("oppdatert")
The following line is returned when i run my function:
{"isError":false,"errorMsg":null,"response":{"oppdatert":"ja"}}
This is an async-task, and under onTaskComplete i have the following code:
String approved = null;
JSONArray myJsonArray = JSONreturn.getJSONArray("response");
myList.clear();
for(int i = 0; i < myJsonArray.length(); i++) {
JSONObject brukerOppdatert = myJsonArray.getJSONObject(i);
approved = brukerOppdatert.getString("oppdatert");
The application crashes after "JSONArray = myJsonArray = ..."
This method have worked on other json-array, but the difference is that in the past there have been more then one object.
any ideas?