title: Parsing complex JSON in Android
body: <p>Guys i'm trying to parse this JSON below </p>
  
  <pre><code>{"response": 
  {"message": "Success", 
  "code": 2002, 
  "payload": 
      {"article": [
                      {"timestamp_epoch": 1359967680, 
                      "search_score": 10.0, 
                      "headline": "When Sachin felt like bunking cricket practice", 
                      "timestamp": "2013-02-04 08:48:00", 
                      "related_article_count": 0, 
                      "excerpt": "...their campaign 'Support my School' by NDTV in Mumbai on Sunday. Sachin Tendulkar and Aishwarya Rai Bacchan during an event 3/5 Sachin Tendulkar and Aishwarya Rai Bacchan during an event India's Sachin Tendulkar with actress Aishwarya Rai Bachchan during the...", 
                      "source": {"name": "OneIndia", 
                                  "url": "http://www.oneindia.in/", 
                                  "daylife_url": "http://www.daylife.com/source/OneIndia", 
                                  "rank": 3, 
                                  "favicon_url": "http://favicon.daylife.com/imageserve/0e0Jd1Xczb7oW/favicon.png", 
                                  "source_id": "0e0Jd1Xczb7oW", 
                                  "type": "MAINSTREAM"}, 
                      "url": "http://feedproxy.google.com/~r/oneindia-cricket/~3/z1pS6w289SU/when-sachintendulkar-felt-like-bunking-cricket-practice-066016.html", 
                      "daylife_url": "http://www.daylife.com/article/07nC5eTbBE0YA", 
  
                      "article_id": "07nC5eTbBE0YA"}, 
  
  
                      {"timestamp_epoch": 1360361400, 
                      "search_score": 8.69279902947, 
                      "headline": "Sachin equals Sunny",
                             .
                             .
                             .
                             .
                             .
  </code></pre>
  
  <p>I'm just interested in <strong>headline</strong> and <strong>url</strong> values. I'm easily getting those values with this java code below.</p>
  
  <pre><code>JSONObject root = new JSONObject(result);
              JSONObject response = root.getJSONObject("response");
  
              String attributeId = response.getString("message");
              System.out.println(attributeId);
  
              JSONObject payload = response.getJSONObject("payload");
              JSONArray article = payload.getJSONArray("article");
  
  
  
              for (int i = 0; i &lt; article.length(); i++) {
                  JSONObject c = article.getJSONObject(i);
                  String headline = c.getString("headline");
                  String url = c.getString("url");
                  System.out.println(url);
                  System.out.println(headline);
                  strings.add(c.getString("headline").toString());
              }
              arrayAdapter = new ArrayAdapter&lt;String&gt;(MainActivity.this,
                      android.R.layout.simple_list_item_1, strings);
  
              resultList.setAdapter(arrayAdapter);
              arrayAdapter.notifyDataSetChanged();
  </code></pre>
  
  <p>Here i'm setting <strong>headline</strong> in <strong>ListView</strong>(this part is working fine). And my <strong>question</strong> here is : when i click any list it should pass corresponding <strong>url</strong> to the <strong>WebView</strong> activity(actually I'm implementing this in another class). So how to achieve this, how to store corresponding url with headline?? please someone help me..</p>
  
  <p>Thanks in advance..</p>