title: how to sort two json array with time
body: <p>I want to sort two json arrays stream and stream1 with respect to time together.</p>
  
  <p>The record in each array with the latest time will come first.Time is formatted like value of min ago ,days ago</p>
  
  <p>This is the code I have so far:</p>
  
  <pre><code> parseJsonFeed(JSONObject response) {
              try {
                  String stream = pref.getStream();
                  JSONArray feedArray = response.getJSONArray(stream);
  
  
                  for (int i = 0; i &lt; feedArray.length(); i++) {
                      JSONObject feedObj = (JSONObject) feedArray.get(i);
  
                      FeedItem item = new FeedItem();
                      item.setId(feedObj.getInt("id"));
                      item.setName(feedObj.getString("title"));
  
                      // Image might be null sometimes
                      String image = feedObj.isNull("image") ? null : feedObj
                              .getString("image");
                      item.setImge(image);
                      item.setStatus(feedObj.getString("status"));
                      item.setProfilePic(feedObj.getString("profilepic"));
                      item.setTimeStamp(feedObj.getString("created_at"));
  
                      // url might be null sometimes
                      String feedUrl = feedObj.isNull("url") ? null : feedObj
                              .getString("url");
                      item.setUrl(feedUrl);
  
                      feedItems.add(item);
                  }
  
                  // notify data changes to list adapater
                  listAdapter.notifyDataSetChanged();
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
              String stream2 = pref.getStream2();
  
              if (!stream2.contentEquals("none")) {
  
                  try {
  
                      JSONArray feedArray = response.getJSONArray(stream2);
  
  
                      for (int i = 0; i &lt; feedArray.length(); i++) {
                          JSONObject feedObj = (JSONObject) feedArray.get(i);
  
                          FeedItem item = new FeedItem();
                          item.setId(feedObj.getInt("id"));
                          item.setName(feedObj.getString("title"));
  
                          // Image might be null sometimes
                          String image = feedObj.isNull("image") ? null : feedObj
                                  .getString("image");
                          item.setImge(image);
                          item.setStatus(feedObj.getString("status"));
                          item.setProfilePic(feedObj.getString("profilepic"));
                          item.setTimeStamp(feedObj.getString("created_at"));
  
                          // url might be null sometimes
                          String feedUrl = feedObj.isNull("url") ? null : feedObj
                                  .getString("url");
                          item.setUrl(feedUrl);
  
                          feedItems.add(item);
                      }
  
                      // notify data changes to list adapater
                      listAdapter.notifyDataSetChanged();
                  } catch (JSONException e) {
                      e.printStackTrace();
                  }
              }
  
          }
  </code></pre>
  
  <p>I need to sort the arrays together to show the most recent item in each array first, then the next most recent, and so on.</p>