title: Converting the Database details to JSON object
body: <p>I have a table with has the columns namely</p>
  
  <p>recordID,    recordName ,  titleFeild, titleIDMap, titleId, titleStartDate, titleEndDate, languageId</p>
  
  <p>Now I have convert the data from above columns to the JSON object data which looks like below</p>
  
  <pre><code>{
    "recordId" :10,
    "recordName" : "RECORDS",
    "records" : [ {
      "titleField" : 1,
      "titleIDMap" : null,
      "titleId" : 500,
      "titleStartDate" : "2013-12-22T00:00:00.000+0000",
      "titleEndDate" : "2013-12-03T00:00:00.000+0000",
      "languageId" : 20
    }]
  }
  </code></pre>
  
  <p>Please note that <strong>records</strong> is an <strong>array of columns</strong> ( titleFeild,titleIDMap,titleId,titleStartDate,titleEndDate,languageId)</p>
  
  <p>The code so far I have developed is </p>
  
  <pre><code>    List&lt;Object[]&gt; objList = dao.getStatus();
      Integer result = null;
       JSONObject jsonData = new JSONObject();
       JSONArray jsonDataArray = new JSONArray();
      if(objList!=null &amp;&amp; objList.size()&gt;10000)
          {
              for (Object[] nameObj : objList) {
  
                  jsonData.put("", nameObj.get(arg0) );
  
  
              }
          }
  </code></pre>
  
  <p><strong>How do I construct the JSON Object from the columns data ?</strong></p>