Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82142

DataTables not getting populated by Rest services

$
0
0
Hi
I have a datatable wherein the ajax source is Java rest webservice. The webservice is returning me a json object as below:
[{"Name":"name0","Path":"Path0"},{"Name":"name1","Path":"Path1"}]

The script code is as below
$(document).ready(function () {

    var oTable = $('#myDataTable').dataTable({
        
        "sAjaxSource": "http://localhost:8080/api/store/masters",
        "sAjaxDataProp": "",
        "aoColumns": [{ "mData": "Name" }, { "mData": "Path"}]
    });

The server code is being called and it returns the json object but somehow the data table is not populating it. I would appreciate any help.

Thanks

Viewing all articles
Browse latest Browse all 82142

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>