{
"module": "abc",
"chapter": "1",
"source": "Google",
"error": {
"1": {
"sourceLanguage": "English",
"message": "not found",
"array": "[a, b, c]"
},
"2": {
"sourceLanguage": "English",
"message": "not found",
"array": "[a, b, c]"
},
"3": {
"sourceLanguage": "English",
"message": "not found",
"array": "[l, m, n]"
}
}
}
how to decode jsonobject to get error with each key & access each value separately for each key. Tried this but cannot split value of each key.
Map mapobj=(JSONObject) jsonObj.get("error");
Iterator iterator=mapobj.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry pair=(Entry) iterator.next();
System.out.println(pair.getKey()+""+pair.getValue());
}