title: How to properly parse and display json from a link in a parent json
body: <p>I am parsing this json:</p>
  
  <pre><code>[
    {
      "title": American Government,
      "type": "Democracy",
      "independent": {
            "from": [
              {
                "Britain"
              }
            ],
            "date": [
              {
                "by": "Britain",
                "day_real": "http://example.com/json/independent"
              }
            ],
  
          },
      }
    ...]
  </code></pre>
  
  <p>The value of "day_real" leads to another json which looks like this:</p>
  
  <pre><code>{
      "year": 1800,
      "from": "Brtain"
      }
  </code></pre>
  
  <p>My aim is to parse both json and display it in a recyclerview.</p>
  
  <p>These are  my classes.</p>
  
  <p><strong>MainActivity</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
       private final String TAG = "MainActivity";
       private String govDate;
  
       //Creating a list of govns
       private List&lt;GovnItems&gt; mGovnItemsList;
  
       //Creating Views
       private RecyclerView recyclerView;
       private RecyclerView.Adapter adapter;
  
       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);
           Log.d(TAG, "onCreate called");
  
           //Initializing Views
           recyclerView = (RecyclerView) findViewById(R.id.govn_recycler);
           LinearLayoutManager layoutManager = new LinearLayoutManager(this);
           recyclerView.setLayoutManager(layoutManager);
  
           adapter = new GovnAdapter(mGovnItemsList, this);
  
           recyclerView.setAdapter(adapter);
      getData ();
  
       }
  
  
  
       //This method will get data from the web api
  
       private void getData(){
           Log.d(TAG, "getData called");
  
           //Creating a json request
           JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(ConfigGovn.GET_URL,
                   new Response.Listener&lt;JSONArray&gt;() {
                       @Override
                       public void onResponse(JSONArray response) {
                           Log.d(TAG, "onResponse called");
  
                           //calling method to parse json array
                           parseData(response);
  
                       }
                   },
                   new Response.ErrorListener() {
                       @Override
                       public void onErrorResponse(VolleyError error) {
                       }
                   });
  
           //Creating request queue
           RequestQueue requestQueue = Volley.newRequestQueue(this);
  
           //Adding request to the queue
           requestQueue.add(jsonArrayRequest);
  
       }
  
  
       //This method will parse json data
       private void parseData(JSONArray array){
           Log.d(TAG, "Parsing array");
  
  
           for(int i = 0; i&lt;array.length(); i++) {
               GovnItems govnItem = new GovnItems();
               JSONObject jsonObject = null;
               try {
                   jsonObject = array.getJSONObject(i);
  
                   govnItem.setGovnTitle(jsonObject.getString("title"));
                   govnItem.setGovnType(jsonObject.getString("type"));
  
                  JSONObject govnInde = jsonObject.getJSONObject("independent");
                  JSONArray govnDate = govnInde.getJSONArray("date");
                  String dayUrl = govnDate.getJSONObject(0).getString("day_real");
                  govDate = dayUrl;
               } catch (JSONException w) {
                   w.printStackTrace();
               }
  
               mGovnItemsList.add(govnItem);
               loadDate();
           }
  
           adapter.notifyItemRangeChanged(0, adapter.getItemCount());
  
  
       }
  
       private void loadDate() {
           Log.d(TAG, "Loading Date");
  
           final JsonObjectRequest dateObjectRequest = new JsonObjectRequest(govDate, null,
                   new Response.Listener&lt;JSONObject&gt;() {
                       @Override
                       public void onResponse(JSONObject response) {
                           Log.d("Debug", response.toString());
                           parseDate(response);
                       }
                   },
                   new Response.ErrorListener() {
                       @Override
                       public void onErrorResponse(VolleyError error) {
                           VolleyLog.d("", "Error: " + error.getMessage());
                       }
                   });
           //Creating resquestqueue
           RequestQueue dateRequest = Volley.newRequestQueue(this);
  
           //Adding request to queue
           dateRequest.add(dateObjectRequest);
       }
  
       //This method will parse date
       private void parseDate(JSONObject authJsonObject) {
           Log.d(TAG, "Parsing Indep day");
           GovnItems dateItem = new GovnItems();
  
           try {
               String dateFrom = authJsonObject.getString("from");
               dategovnItem.setGovn_author(dateFrom);
               Log.d(TAG, authorName);
           } catch (JSONException w) {
               w.printStackTrace();
           }
           mGovnItemsList.add(dateItem);
  
       }
   }
  </code></pre>
  
  <p><strong>GovnAdapter</strong></p>
  
  <pre><code>public class GovnAdapter extends RecyclerView.Adapter&lt;RecyclerView.ViewHolder&gt;{
  
       private Context mContext;
  
       //List of govns
       private List&lt;GovnItems&gt; mGovnItems;
  
       private final int VIEW_ITEM = 0;
       private final int VIEW_PROG = 1;
  
       private int lastPosition = -1;
  
      public GovnAdapter(List&lt;GovnItems&gt; govnItems, Context context) {
          super();
  
          //Getting all govns
          this.mGovnItems = govnItems;
          this.mContext = context;
      }
  
       @Override
       public int getItemViewType(int position) {
           if (isPositionItem(position))
               return VIEW_ITEM;
           return VIEW_PROG;
       }
  
       private boolean isPositionItem(int position) {
          return position != getItemCount()-1;
       }
  
  
  
       @Override
       public RecyclerView.ViewHolder  onCreateViewHolder (ViewGroup parent, int viewType) {
           if (viewType == VIEW_ITEM) {
               View v =  LayoutInflater.from(parent.getContext())
                       .inflate(R.layout.govn_summ, parent, false);
               return new TextViewHolder(v);
           } else if (viewType == VIEW_PROG){
               View v = LayoutInflater.from(parent.getContext())
                       .inflate(R.layout.recyclerfooter, parent, false);
               return new ProgressViewHolder(v);
           }
  
           return null;
       }
  
  
  
       @Override
       public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
  
           if (holder instanceof TextViewHolder) {
  
               final GovnItems govnList = mGovnItems.get(position);
               ((TextViewHolder) holder).govnTitle.setText(Html.fromHtml(govnList.getGovn_title()));
               ((TextViewHolder) holder).govnType.setText(Html.fromHtml(govnList.getGovn_type()));
               ((TextViewHolder) holder).govnDate.setText(govnList.getGovn_date());
  
           } else {
               ((ProgressViewHolder) holder).progressBar.setIndeterminate(true);
               ((ProgressViewHolder) holder).loadButton.setText(R.string.reload);
           }
  
  
       }
  
  
       @Override
       public int getItemCount(){
           //Return the number of items in the data set
           return mGovnItems.size();
       }
  
  
       public static class TextViewHolder extends RecyclerView.ViewHolder{ 
           public TextView govnTitle,govnType, govnDate; 
  
           public TextViewHolder (final View govnView) {
               super(govnView);
               govnTitle = (TextView) govnView.findViewById(R.id.govn_title);
               govnType = (TextView) govnView.findViewById(R.id.govn_type);
               govnDate = (TextView) govnView.findViewById(R.id.govn_date);
  
           }
  
  
       public static class ProgressViewHolder extends RecyclerView.ViewHolder {
           Button loadButton;
           ProgressBar progressBar;
           public ProgressViewHolder(View footerView){
               super(footerView);
               loadButton = (Button) footerView.findViewById(R.id.reload_button);
               progressBar = (ProgressBar) footerView.findViewById(R.id.progress_load);
           } 
       }
  
  
   }
  </code></pre>
  
  <p>The problem I am having with this code is getting the value of "from" to display. It just doesn't display. From my logcat, I can see that the date is really fetched and "from" is being succesfully parsed but it just won't display. 
  I have debugged and debugged but got no clue.</p>
  
  <p>Please, do you know how I should solve this problem?</p>