title: How to iterate JSONArray in java
body: <p>I would like to extract the values from JSONArray. JSONArray has N number of rows and columns. </p>
  
  <pre><code>        ObjectMapper mapper = new ObjectMapper();
          DynamicForm dynamicForm = new DynamicForm();
          dynamicForm = dynamicForm.bindFromRequest();
          Dynamic dynamic = dynamicForm.get(); 
          //List&lt;OneModel&gt; list = new ArrayList&lt;OneModel&gt;();
          //List iterate=new ArrayList();
  
          String data = dynamic.getData().get("content").toString();
          try {
              JSONArray jsonArray = new JSONArray(data);
              for (int i = 0; i &lt; jsonArray.length(); i++) {
                  System.out.println(jsonArray.get(i));
          } }catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }   
  </code></pre>
  
  <p>Its resulting as follows.</p>
  
  <pre><code>["1001432","05-KALENJI-P1229","KALENJI","2","2014-11-09 09:37:14.379482",""],
  ["1001432","05-KALENJI-P1228","KALENJI","1","2014-11-09 09:37:14.379482",""],
  ["1001432","05-KALENJI-P1227","KALENJI","5","2014-11-09 09:37:14.379482",""]
  </code></pre>
  
  <p>I would like to extract one by one values and assign it to variable. for example 1001432,05-KALENJI-P1229,KALENJI,2,2014-11-09 09:37:14.379482. So that i can process each values. Please any one help me in the same</p>