Here my valid JSON Data
{
"query": {
"pages": {
"8691": {
"pageid": 8691,
"ns": 0,
"title": "d"
}
}
}
}
this my data how to get pageid and title values.
EDIT: So I get a JSONObject pages and I want to get JSONObjects from pages, but the problem is that their name is different everytime.So I can’t just do json.getJSONObject(“8691”);. So any suggestions how can I do that?
you can try somehing like this :
since your pageId is dynamic, you can get the name of the first index object in your JSONObject