title: jQuery DataTables with Node.js
body: <p>So i am trying to implement a pagination table with the datatables plugin, this is my first time using this plugin. I followed the documentation on the plugin and tried to get the values from the server through the use of Ajax, as per presented in the plugins documentation. </p>
  
  <p>I seem to be getting the following error once i make the get request and i am unsure of why? </p>
  
  <p>Error: <strong>Uncaught TypeError: Cannot read property 'length' of undefined</strong></p>
  
  <p>On client side i have the following code </p>
  
  <pre><code>viewReports = {
      init: function(){
          $('#paginatedData').DataTable({
              "processing": true,
              "serverSide": true,
              "ajax": '/viewreports'
          });
  
      }
  };
  
  $(document).ready(viewReports.init);
  </code></pre>
  
  <p>In my server side i have the following </p>
  
  <pre><code>router.get('/viewreports', function(res, req){
  
      async.parallel({
          viewReports: function(callback){
              restCall('/rest/bugbounty/latest/message/searchReport', 'POST', parameters, function(data){
                  callback(null, data);
              }); 
          }
      }, function(err, result){
          if(!err){
              res.send(result.viewReports);
              res.render('viewreports');
          }
      });
  });
  </code></pre>
  
  <p>Returned JSON:</p>
  
  <blockquote>
    <p>{ reportList: [ { reportID: 'EIBBP-448', eBayUserID: ' ', reportStatus: 'New', summary: 'BugBounty Report created by Raj', lastUpdatedDate: '2015-06-15 01:05', createdDate: '2015-06-15 01:05', paypalLoginID: 'raaj@paypal.com' } ], searchStatus: 'Success', eBayUserID: '', errorCode: '0', rowCount: '6', pageNumber: '1', paginationValue: '1', paypalLoginID: 'raaj@paypal.com' }</p>
  </blockquote>
  
  <p>It would be great to know if there is anyone who has worked with node.js server side processing for datatables </p>