title: Transforming db data to json in web2py for visualization with flot.js
body: <p>I'm having problem to get a valid json string for flot.js visualisation from db data in web2py.</p>
  
  <p>This is my controller action: </p>
  
  <pre><code>def getdata():
      return dict(data=db().select(db.realtimedata.id, db.realtimedata.FlowRate, limitby=(0, 3), orderby=~db.realtimedata.id))
  </code></pre>
  
  <p>Generic json view returns this json string for getdata action:</p>
  
  <pre><code>{"data": [{"id": 1, "FlowRate": 373}, {"id": 2, "FlowRate": 379}, {"id": 3, "FlowRate": 376}]}
  </code></pre>
  
  <p>How can i get this json string?</p>
  
  <pre><code>[[1,373],[2,379],[3,376]]
  </code></pre>