title: How to put a JSONArray into an Android ListView
body: <p>I am trying to populate a ListView in the android app. I have the data in a JsonArray, But it doesn't work to directly use the JsonArray. Any suggestions How to populate the ListView?</p>
  
  <pre><code>   JSONObject json = null;
     try {
         json = new JSONObject(client.getResponse());
         JSONArray nameArray = json.names();  
         JSONArray valArray = json.toJSONArray(nameArray);
  
     } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
     } 
  
     setListAdapter(new ArrayAdapter&lt;String&gt;(this, 
          android.R.layout.simple_list_item_1, valArray));
  </code></pre>
  
  <p>I am trying to have "valArray", but it doesn't work.
  Also I wonder what does valarray contain? (JsonArray, what does it contain)</p>