title: Returning queries from couchdb using nano
body: <p>i've written a simple module to handle my couchdb CRUD operations using nano, however i'm having hardship returning from the results i query from the couch database. My Code is as follows.
  <strong>couchdb.js</strong></p>
  
  <pre><code>//Select from couch view
  exports.couchSelect=function (_db, document,view) {
      return _db.view(document, view,function(err, body){
  
              if(!err){
                  var rows = body.rows; //the rows returned
                  console.log(rows);
                  return rows;
              }else{
                  console.log(err);
              }
  
          }
      );
  }
  </code></pre>
  
  <p><strong>routes.js</strong></p>
  
  <pre><code>var couchdb = require('./couchdb');
  app.get("/orders", function (req, res) {
      var db = couchdb.couchConnect('ezyextension_orders');
      var insert = couchdb.couchSelect(db, 'orders', 'orders');
      console.log(insert);
  });
  </code></pre>
  
  <p>On executing the returned output is only get Node http request parameters without the returned rows, need help to return the actual JSON rows queried.Thanx</p>