try this
ArrayList arrayList = new ArrayList<>();
JSONObject jsonObject= new JSONObject("response");
JSONArray myArray = jsonObject.optJSONArray("images");;
for (int j = 0; j < myArray.length(); j++) {
try {
JSONArray jsonarray = myArray.optJSONArray(j);
for (int i = 0; i < jsonarray.length(); i++){
String data = jsonarray.getString(j);
Log.e("PHOTOS_URL", i + "=" + data);
arrayList.add(data);
}
} catch (JSONException e) {
e.printStackTrace();
}
}