Если ваш Json нравится
{
"complaint_list":{
"1":"light not working",
"2":"fan not working",
"3":"refrigerator not working ",
"4":"lock not working"
}
}
Вам необходимо выполнить такой анализ
JSONObject jsonMain = new JSONObject("YOUR_JSON");
JSONObject json= json.getJSONObject("complaint_list");
ArrayList complaintList= new ArrayList<String>();
Iterator<String> iter = json.keys();
while (iter.hasNext()) {
String key = iter.next();
try {
String value = json.get(key);
//json.getString(value) --> here you can get your jsonObject value.
complaintList.add(json.getString(value));
} catch (JSONException e) {
// Something went wrong!
}
}