title: How to get array of row values from JDBC result set
body: <p>I have a sql statement that brings back the following rows:</p>
  
  <p><img src="https://i.stack.imgur.com/MPVDA.png" alt="enter image description here"></p>
  
  <p>I would like to obtain these values from a JDBC result set as two objects.  One for the customer with customerNo 1 and the other for customer 2.  I would like the two objects to have another array value with the related Titles with the object values.</p>
  
  <p>The structure would ultimately look like this (in JSON):</p>
  
  <p>{customerNo : 1, ["Object 1", "Object 2", "Object 3"]}, {customerNo : 2, ["Object 4", "Object 5"]}</p>
  
  <p>How can I accomplish this with JDBC?</p>