Unable to load data from "json.txt"

Unable to load data from "json.txt"

adzhamadzham Posts: 6Questions: 2Answers: 0
edited February 2019 in Free community support

<script type="text/javascript">
                $(document).ready(function(){
                   $('#testrowTable').dataTable({
                       "ajax" : "assets/data/test.txt",
                       "ajax" : { url: '/assets/json-file', dataSrc: ""},
                       "columns" : [
                           { "data" : "user_id" },
                           { "data" : "first_name" },
                           { "data" : "last_name" },
                           { "data" : "full_name" },
                           { "data" : "user_name" },
                           { "data" : "user_type" },
                           { "data" : "user_type_name" },
                           { "data" : "is_active" },
                       ]
                   });
                });
</script>

Greetings. Hi guys.
here i attached a screenshot pic.
may someone help me why i cant load my data into the table? i

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @adzham ,

    It would help to post a snippet of the JSON file if this is still an issue. It should match the format of the data in the "Ajax" tab of this example.

    Cheers,

    Colin

  • adzhamadzham Posts: 6Questions: 2Answers: 0

    @colin hi colin. tq for helping me. :D

This discussion has been closed.