title: Select as JSON joined tables
body: <p>I would like to select data from 2 tables into one json string. First table should list all linked tables from second table like</p>
  
  <p>First table:</p>
  
  <pre><code>SELECT [orderNumber], [tcpState] 
  FROM [Tracking]
  </code></pre>
  
  <p>Second table:</p>
  
  <pre><code>SELECT [startdate], [enddate], [tcpState], [orderNumber], [name]
  FROM [Stations]
  </code></pre>
  
  <p>Tracking can link several stations.</p>
  
  <p>Expected result:</p>
  
  <pre><code>[{
          "orderNumber": 123455,
          "tcpState": 3,
          "Stations": [{
                  "startdate": "2011-05-06",
                  "enddate": "2012-09-15",
                  "tcpState": 3,
                  "name": "Roger"
              },
              {
                  "startdate": "2011-02-06",
                  "enddate": "2012-05-15",
                  "tcpState": 4,
                  "name": "Hans"
              }
          ]
      },
      {
          "orderNumber": 1566,
          "tcpState": 3,
          "Stations": [{
                  "startdate": "2011-06-06",
                  "enddate": "2012-08-15",
                  "tcpState": "6",
                  "name": "Mike"
              },
              {
                  "startdate": "2011-03-06",
                  "enddate": "2012-03-15",
                  "tcpState": "6",
                  "name": "Tom"
              }
          ]
      }
  ]
  </code></pre>