My JSON structure is simple :
"categories": [2],
I am succesfull in getting this output on my Android studio code as :
JSONArray jsonArray = jsonObject.getJSONArray("categories");
Log.e("CAT ID", String.valueOf(jsonArray));
Outputis :
E/CAT ID: [2] //and other IDS respectively
My question is how can I remove the braces and just get the Integer values?