title: Store DB columns values to string in Groovy
body: <p>I am trying to store Sql query result to string.</p>
  
  <pre><code>def DBlist = con.rows("select a.pkResourceItemsID,b.fieldValue,a.fkResourceID,a.fkCountryID,b.fkLocationID,b.fkBusinessUnitID,b.floor from tblResourceItems a inner join tblresourceitemData b on a.pkResourceItemsID=b.fkResourceItemID where a.pkResourceItemsID='$id'" )
  
  log.info "DB_List = ${DBlist}"
  </code></pre>
  
  <p>The result I am getting:</p>
  
  <pre><code>DB_List =[[pkResourceItemsID:2000, fieldValue:Hello, fkResourceID:1, fkCountryID:1, fkLocationID:88, fkBusinessUnitID:518, floor:1]]
  </code></pre>
  
  <p>The result I want :</p>
  
  <pre><code>DB_List =[2000, Hello, 1, 1, 88, 518, 1]
  </code></pre>
  
  <p>What I have tried :</p>
  
  <pre><code>def a = DBlist.pkResourceItemsID
  </code></pre>
  
  <p>It Gives me result <code>[2000]</code>, but I can only do this for one column at a time. </p>
  
  <p>Don't know how to do for all the columns. How can achieve this?</p>