title: Only one row is posting to server through JSON
body: <p>I am trying to send data from sqlite to server as json object. It is capturing the data but only one data(row) is going to server.</p>
  
  <p>My json code is</p>
  
  <pre><code>JSONObject jobj = new JSONObject();
  
  
   if (c.moveToFirst()) {
          do {
              jobj.put("add_fld1", "Test1");
              jobj.put("add_fld2", "Test2");
              jobj.put("add_fld3", "Test3");
  
              jobj.put("credated_dt", c.getString(6));
              // jobj.put("id", c.getInt(0));
  
              jobj.put("emp_code", c.getString(5));
              jobj.put("location", c.getString(3));
  
              jobj.put("name", c.getString(1));
  
              jobj.put("phone", c.getString(2));
              jobj.put("remarrks", c.getString(4));
  
          }
          while (c.moveToNext());
      }
  
           return jobj.toString();
      }
  </code></pre>
  
  <h2>Update</h2>
  
  <p>JsonArray is working but the server is not showing the data now.</p>
  
  <p>JsonArray code</p>
  
  <pre><code>    private String getQuery() throws UnsupportedEncodingException, JSONException {
  
      Cursor c = sqLiteHelper.getData("SELECT * FROM DETAILS");
      JSONObject jobj = new JSONObject();
      JSONArray jsonArray = new JSONArray();
  
          while (c.moveToNext()) {
  
  
              jobj.put("add_fld1", "Test1");
              jobj.put("add_fld2", "Test2");
              jobj.put("add_fld3", "Test3");
  
              jobj.put("credated_dt", c.getString(6));
              // jobj.put("id", c.getInt(0));
  
              jobj.put("emp_code", c.getString(5));
              jobj.put("location", c.getString(3));
  
              jobj.put("name", c.getString(1));
  
              jobj.put("phone", c.getString(2));
              jobj.put("remarrks", c.getString(4));
              jsonArray.put(jobj);
  
  
          }
  
  
      return jsonArray.toString();
  
  }
  </code></pre>
  
  <p>Json Array is capturing all the data and response is success but the server is not showing the JsonArray data,but it was showing jsonobject data.</p>