Quotation in block What I want is not to repeat code can pull the data without doing array, array1 etc how can I do it?
val stringRequest = StringRequest(Request.Method.GET, URL_DATA, Response.Listener { response ->
progressDialog.dismiss()
try {
val jsonObject = JSONObject(response)
val array = jsonObject.getJSONArray("VXM_POP_ESPANOL_ENERGIZANTE")
val array1 = jsonObject.getJSONArray("VXM_POP_ESPANOL_FESTIVO")
for (i in 0 until array.length()) {
val jo = array.getJSONObject(i)
val developers = DeveloperList(jo.getString("song_id"), jo.getString("song_time"), jo.getString("song_name"))
developersLists!!.add(developers)
}