title: Unable to stream JSON array
body: <p><strong>Below is my code:</strong></p>
  
  <p>Imports are: org.json.JSONArray, org.json.JSONObject</p>
  
  <pre><code>String x="{\"count\":25,\"rows\":[{\"id\":10,\"name\":\"xxx\"},{\"id\":11,\"name\":\"xyx\"}]}";
  JSONObject obj=new JSONObject(x);
  JSONArray arr=obj.getJSONArray("rows");
  </code></pre>
  
  <p>Actual data has many records with many key values which i need to filter. So i tried <code>arr.stream()</code> but on compilation itself it shows method <code>stream()</code> is undefined for type <code>JSONArray</code>.</p>
  
  <p>I use java 8. streams work for list. I am getting values of key rows in arr. Please clarify why and how it can be solved.</p>