title: Nodejs JOIN query: formatting JSON output
body: <p>I'm making a pretty simple RIGHT JOIN query, but I can't format the output correctly.</p>
  
  <p>Here is the Query:</p>
  
  <pre><code>connection.query({sql : "SELECT users.*, rides.* FROM users RIGHT JOIN rides ON users.id = rides.id_user WHERE users.id = ?", nestTables: '_', values : [id] }, function(err, rows){
     console.log(rows);
  });
  </code></pre>
  
  <p>This is the output I have:</p>
  
  <pre><code>[ { users_id: 52,
      users_firstname: 'greg', //End first table data
      rides_latitude: '50.847454', //Second table data: row 1
      rides_longitude: '4.358356',
    },
    { users_id: 52,
      users_firstname: 'greg', //Exactly the same first table data
      rides_latitude: '50.9', //Second table data: row 2
      rides_longitude: '4.4',
     } ]
  </code></pre>
  
  <p>And this is the ouput I would like to have:</p>
  
  <pre><code>[ { users_id: 52,
      users_firstname: 'greg',
      rides : [
           {
           rides_latitude: '50.847454',
           rides_longitude: '4.358356'
           },
           {
           rides_latitude: '50.9',
           rides_longitude: '4.4'
           }
     ]
    }]
  </code></pre>
  
  <p>I tried <code>nestTables</code> as you can see, </p>