I am trying to get the URL from the following JSON response:
{
"json": {
"errors": [],
"data": {
"url": "urlIWant.com",
"id": "asdklfjads",
"name": "sdfjklsdf"
}
}
}
I have been banging my head against the wall trying to get the URL out of this response. What code do I need to access that url in Android?
Here is the latest few lines of code that I have tried to get the url.
JSONObject json = new JSONObject(responseStr);
json = json.getJSONObject("data"); //Get the "data" object out of the JSON
url = json.getString("url"); //Grab the URL from the object
Log.d("JSON URL", url); //url is null here