I have a JSON string coming from the server and it looks like this:
{
\"categories\": {
\"0\": {
\"term_id\": \"247\",
\"
try this
JSONObject jObject = new JSONObject(responceData);
JSONObject categoryObject = jObject.getJSONObject("categories");
JSONObject obj0 = categoryObject.getJSONObject("0");
String termId0 obj0.getString("term_id");
String name0 obj0.getString("name");
JSONObject obj1 = categoryObject.getJSONObject("1");
String termId1 obj1.getString("term_id");
String name1 obj1.getString("name");
but i agree with wqrahd, categories should be an array