title: JsonArray loop using Streams
body: <p>I'm trying to loop a JsonArray using Streams in java, I have looped a JsonObject Using the following code</p>
  
  <pre><code>jsonObject.entrySet().stream()
  </code></pre>
  
  <p>but there isn't no <code>entrySet()</code> class for JsonArray, How ever I tried using the iterator method but it only printed out one of the JsonObject inside of the JsonArray here is my attempt</p>
  
  <pre><code>.map(JsonArray::iterator)
  .map(Iterator::next)
  .forEach(System.out::println);
  </code></pre>
  
  <p>Edit: I'm getting the JsonArray from a JsonObject stream</p>
  
  <pre><code>.map(JsonArray.class::cast)
  //need to handle jsonArray
  </code></pre>