I am trying to extract Key and values from my JSONObject. But i am not able to do that. Here is the JSON:
[{\"id\":[\"5\"]},{\"Tech\":[\"Java\"]}]
Because at id you dont have a string , you have a array of string ,
id
so insted of doing this jsonObj.getString("id");
jsonObj.getString("id");
do this
jsonObj.getArray("id"); this will give you that array in return
jsonObj.getArray("id");
like if you have a Json Array at id then you have to do this
jsonObj.getJSONArray("id");