mongodb + node.js + datatables?

mongodb + node.js + datatables?

gjw80gjw80 Posts: 2Questions: 0Answers: 0
edited October 2013 in General
Hopefully this isn't too terrible of a question but I'm having a lot of problems finding good documentation on how to use DT in conjunction with node.js and mongodb. I can setup the DT using jquery just fine, but I am trying to dynamically provide data for the table by querying a mongodb collection and returning the result set (as an array) back to the DT initialisation variable ('aaData' it looks like).

Any helpful links/tips? :D

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I can't comment on how to use mongo or node, as this isn't the correct forum for that - but if you can get the data out as JSON, DataTables can consume just about any data source: http://datatables.net/blog/Extended_data_source_options_with_DataTables . Also you don't have to use `aaData` - that is configurable using sAjaxDataProp .

    Allan
This discussion has been closed.