Hello,
I'm trying to parse data and I'm using show-fields to get the byline. The object name appears to be "fields" but when I do that and try to build the app, I get an error saying there is no value for "fields". I've tried several ways, but this is the most recent. Any guidance would be appreciate!
Thanks!!
JSONObject baseJsonResponse = new JSONObject(newsJSON);
JSONObject parentObject = baseJsonResponse.getJSONObject("response");
JSONArray newsArray = parentObject.getJSONArray("results");
JSONObject currentNews;
JSONObject fields;
for (int i = 0; i < newsArray.length(); i++) {
//JSONObject currentNews = newsArray.getJSONObject(i);
currentNews = newsArray.getJSONObject(i);
fields = newsArray.getJSONObject(i).getJSONObject("fields");
<!---- Error below ---------!>
E/QueryUtils: Problem parsing the news JSON results
org.json.JSONException: No value for fields