title: How to get the values of a JSONArray by using simple JSON in Java?
body: <p>I'm trying to get just the values of a JSONArray that i can store to a ArrayList or an Array. My Code is this at the moment: </p>
  
  <pre><code>  JSONArray params = (JSONArray) res.get("params");
    for (int j = 1; j &lt;= params.size(); j++){
  
               Object chatter = params.get(j);
               String chatterName = chatter.toString();
               System.out.println("ChatterName: "+chatterName);
               int index = 2;
               listModel.add(index, chatterName);  
               index++;
    }
  </code></pre>
  
  <p>My problem is that i get the keys too: </p>
  
  <pre><code>ChatterName: Steve
  ChatterName: Blubb
  ChatterName: 2
  ChatterName: 3
  ChatterName: Joey
  ChatterName: 4
  ChatterName: Chris
  </code></pre>
  
  <p>This is the JSON looks like: </p>
  
  <pre><code>    Input Stream(Response vom Server): {"statuscode":"200","sequence":1382,"response":"sendWho","params":["1","Steve","Blubb","2","3","Joey","4","Chris"]}
  </code></pre>