title: How to use ArrayAdapter and JSONArray for a listView
body: <p>So far I can send a Get request to a server with a letter added to the url :</p>
  
  <pre><code>private void GetDevice() {
  
      String deviceId = editTextDeviceId.getText().toString().trim();
  
      if(TextUtils.isEmpty(deviceId)){
          editTextDeviceId.setError("Please enter deviceId");
          editTextDeviceId.requestFocus();
      }
  
      HashMap&lt;String, String&gt;params = new HashMap&lt;&gt;();
      params.put("deviceID", deviceId);
  
      PerformNetworkRequest request = new PerformNetworkRequest(Api.URL_GETBYDEVICEID + deviceId, null, CODE_GET_REQUEST);
      request.execute();
  
  }
  </code></pre>
  
  <p>When I press the button Search it sends the request :</p>
  
  <pre><code>buttonSearch.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              GetDevice();
          }
      });
  </code></pre>
  
  <p>The server response is JSONArray :</p>
  
  <pre><code>W/System.err: org.json.JSONException: Value [{"DeviceId":"T","TransactionValue":2,"RSSI":2,"Time":"2018-08-02T14:43:00"}] of type org.json.JSONArray cannot be converted to JSONObject
  </code></pre>
  
  <p>Here is my problem.
  From what I read, I know I need to use an ArrayList and ArrayAdapter to convert it into a JSONObject. Am I right so far ?</p>
  
  <p>Here is where I’m stuck, as I don’t understand how to do it. </p>
  
  <p>Many thanks in advance!</p>