title: How to Parse JSONarray inside JSONarray in android?
body: <p>Hi every one I followed <a href="http://www.androidbegin.com/tutorial/android-parsing-yql-using-json-tutorial/" rel="nofollow noreferrer">this</a> one
  to parse JSON from a URL but at the time of parsing I strucked at one place..
  as</p>
  <p>Now I am not getting images please Help. IMAGES, DETAILS ,OFFERS those are not Getting ..
  They are in jsonarray(jsonobject(jsonarray(jsonobject))) please help</p>
  <p>I have a image inside a array like below</p>
  <pre><code>{
  &quot;returnCode&quot;: &quot;success&quot;,
  &quot;Data&quot;: {
      &quot;results&quot;: [
          {
              &quot;moredetails&quot;: [
                  {
                      &quot;newoffers&quot;: [
                          
                      ],
                      &quot;recentoffers_count&quot;: 0,
                      &quot;sku&quot;: &quot;30072246&quot;
                  },
                  {
                      &quot;newoffers&quot;: [
                          {
                              &quot;availability&quot;: &quot;Available&quot;,
                              &quot;currency&quot;: &quot;USD&quot;
                          }
                      ]
                  },
                  {
                      &quot;newoffers&quot;: [
                          {
                              &quot;availability&quot;: &quot;Available&quot;,
                              &quot;currency&quot;: &quot;USD&quot;
                          }
                      ],
                      &quot;offers_count&quot;: 1,
                      &quot;name&quot;: &quot;google.com&quot;
                  }
              ],
              ...&quot;features&quot;: {
                  ..
              },
              &quot;length&quot;: &quot;20&quot;,
              &quot;geo&quot;: [
                  &quot;usa&quot;
              ],
              ..&quot;images&quot;: [
                  &quot;http://google.com.one.jpg&quot;
              ],
              ..
          }
      ],
      ...
     }
     }
  </code></pre>
  <p>Now I want how to parse some of the contents like Images, newoffers which are inside jsonarray(jsonarray) i mean they are like [{ [{ and [{[ json array inside  json array I tried but I am getting error at</p>
  <pre><code>JSONArray json_results = json_results.getJSONArray(&quot;images&quot;);
  </code></pre>
  <p>This is my code..</p>
  <pre><code>try {
  JSONObject json_data = JSONfunctions.getJSONfromURL(url);
  JSONObject json_SemanticS3ProductData = json_data.getJSONObject(&quot;Data&quot;);
  JSONArray json_results = json_SemanticS3ProductData.getJSONArray(&quot;results&quot;);
      for (int i = 0; i &lt; json_SemanticS3ProductData.length(); i++) {
      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
      JSONObject c = json_results.getJSONObject(i);
      map.put(&quot;model&quot;, c.optString(&quot;model&quot;));
      
      JSONObject f = c.getJSONObject(&quot;features&quot;);
      map.put(&quot;Rear-facing Camera&quot;, f.optString(&quot;Rear-facing Camera&quot;));
      
          JSONArray json_results_images = json_results.getJSONArray(&quot;images&quot;);            
          arraylist.add(map);
          
              JSONArray json_sitedetails =json_results.getJSONArray(&quot;details&quot;);
              for (int j = 0; j &lt; json_sitedetails.length(); j++) {
              HashMap&lt;String, String&gt; map1 = new HashMap&lt;String, String&gt;();
              JSONObject sd = json_sitedetails.getJSONObject(j);
              JSONArray json_latestoffers = json_sitedetails.getJSONArray(&quot;offers&quot;);
              for (int k = 0; k &lt; json_sitedetails.length(); k++) {
              HashMap&lt;String, String&gt; map2 = new HashMap&lt;String, String&gt;();
              JSONObject e = json_latestoffers.getJSONObject(k);
              map1.put(&quot;currency&quot;, e.optString(&quot;currency&quot;));                    
              arraylist.add(map1);
              }     
      }
    }
  }
  </code></pre>
  <p>remaning all are fine. but I am unable to parse images,details,and offers.. please help.
  Those three are inside the jsonarray(jsonObject (Jsonarray(jsonobject))) this is the thing..
  Please help..</p>