title: How do i sort JSON Array in java
body: <p>I have a JSON Array:</p>
  
  <pre><code>public JSONObject toJSONObject(DataJSONConverter dataJsonConverter) {
      JSONObject jsonResponse = new JSONObject();
  
      if (datas != null &amp;&amp; dataJsonConverter != null) {
          JSONArray jsonDatas = new JSONArray();
          // for (Iterator&lt;? extends Object&gt; iter = datas.iterator(); iter.hasNext();) {
          // jsonDatas.put(dataJsonConverter.toJSONObject(iter.next()));
          // }
  
          for (Object iter : datas) {
              jsonDatas.put(dataJsonConverter.toJSONObject(iter));
          }
  
          jsonResponse.put("datas", jsonDatas);
          jsonResponse.put("count", count);
  
      }
  </code></pre>
  
  <p>Result in "datas" : </p>
  
  <pre><code>    [{"id":60685,"libelle":"BILAN3","typeAnomalie":"Trop de points 
  invalides","dateDebut":"18\/07\/2013 00:00","numero":"1268"}
  
      {"id":60628,"libelle":"_fictif","typeAnomalie":"Trop de points 
  
  invalides","dateDebut":"02\/06\/2013 00:00","numero":"1242"}
  
      {"id":14672,"libelle":"NAVIL 949","typeAnomalie":"D\u00e9passement","dateDebut":"13\/05\/2012 12:00","numero":"263"}]
  </code></pre>
  
  <p>How can I have an ascending order by "dateDebut" ?</p>
  
  <p>Thx</p>