Hello guys this is my json response:
[
{
"Woa": [
"Seo",
"Rikjeo",
"JDa"
]
},
"Aha",
"Aad",
"Char"
]
I want to add to list strings of Woa:
{
"Woa": [
"Seo",
"Rikjeo",
"JDa"
]
}
This is what I've done so far:
JSONObject object = new JSONObject(result);
JSONArray a = object.getJSONArray("Woa");
for (int i = 0; i < a.length(); ++i) {
listWoa.add(a.getString(i));
}
But I'm getting this error:
type org.json.JSONArray cannot be converted to JSONObject
Any ideas why I'm not getting any string and cannot be converted to JSONObject.