DataTables: Cannot read property 'length' of undefined

前端 未结 11 1214
醉酒成梦
醉酒成梦 2020-12-13 05:15

I understand this a popular issue, and I have read all the similar questions here on Stack Overflow and other sites (including the datatables website).

To clarify, I

11条回答
  •  庸人自扰
    2020-12-13 06:02

    OK, thanks all for the help.

    However the problem was much easier than that.

    All I need to do is to fix my JSON to assign the array, to an attribute called data, as following.

    {
      "data": [{
        "name_en": "hello",
        "phone": "55555555",
        "email": "a.shouman",
        "facebook": "https:\/\/www.facebook.com"
      }, ...]
    }
    

提交回复
热议问题