I am getting a string value like this:
[{
"data": [127, 145, 225, 167, 200, 173, 411, 505, 457, 243, 226, 156, 298, 237, 425, 405, 391, 258]
}]
Now I just want to get values, and not the key ("data"). How can I do that. like :
[127, 145, 225, 167, 200, 173, 411, 505, 457, 243, 226, 156, 298, 237, 425, 405, 391, 258]
I tried this but its calling whole string:
try {
final JSONObject obj = new JSONObject(s);
final JSONArray geodata = obj.getJSONArray("data");
final JSONObject person = geodata.getJSONObject(0);
Log.d("myListjson", String.valueOf(person.getString("data")));
} catch (JSONException e) {
e.printStackTrace();
}