I am getting error as value of java.lang.String cannot be converted to JSONObject : <p>my JSONResponse looks as follows</p>

<p>[["1","somevalue","1234567890","1239876093","some"],   ["2","somevalue","1234567890","1234567890","some"]]</p>

<p>and code accessing it is as follows</p>

<pre><code>            try{
                String[] details = {""};
                JSONArray array1 = new JSONArray(response);
                JSONArray array = array1.getJSONArray(0);
                JSONObject object;
                //print(array.length() + "");
                for(int i = 0; i &lt; array.length(); i++){
                    object = array.getJSONObject(i);
                    details[i] = object.getString("roll") + "   " + object.getString("name");
                    ArrayList&lt;String&gt; list = new ArrayList&lt;&gt;();
                    list.addAll(Arrays.asList(details));

                    ArrayAdapter&lt;String&gt; defaulters = new ArrayAdapter&lt;String&gt;(ShowDefaulters.this, android.R.layout.simple_list_item_1, list);
                    listView.setAdapter(defaulters);
                }
            }
            catch (Exception e){
                print(e.getMessage());
            }
</code></pre>
