JSON looks like:
{
"cover":"blabla.jpg",
"content":[
{
"article":"article_text",
"document":"document_text"
}
]
}
I know how to get "cover"
:
JSONObject json = new JsonObject(jsonStr);
json.get("cover");
But how can I get value by "article"
key?
You can try something like this:
yourJSonObject.getJSONObject("cover").getJSONObject("content").getJSONObject("article");
Oh, i did it. Thanks.
json.getJSONArray("content").getJSONObject(0).getString("article")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With