How to display content of json file using jquery?

How to display content of json file using jquery?

patreeeeekpatreeeeek Posts: 14Questions: 7Answers: 0
edited July 2018 in Free community support

Hey guys I'm getting an error: Uncaught TypeError: Cannot read property 'length' of undefined

I am using java spring.

see below for my codes and the json file



This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    Answer ✓

    Looks like the JSON data is in an object called bbData. Datatables looks for the data in an object called data by default. You can either change your server script to use data instead of bbData or you can use ajax.dataSrc to get the data from bbData.

    Kevin

  • patreeeeekpatreeeeek Posts: 14Questions: 7Answers: 0

    Hello kthorngren!

    That's what I did and it worked! Thank alot!

This discussion has been closed.