title: Java - How to convert data from mysql database to a JSON Array?
body: <p>I have a mysql database with the table "trips" with some columns, it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/7Fsb5.png" alt="Table Example"></p>
  
  <p>Each row contains the data for one trip. And I want to search for the "asg_id" and want to get all rows(trips) with this "asg_id" . </p>
  
  <p>My question is, how to convert this data with the individual trips tho a JSON Array?
  Or, how can I get all trips with this "asg_id"?</p>