0

I have the json coming as this

"{\"data\":[{\"Youtube\":\"CD7JYg1inF8\",\"ID\":1,\"Title\":\"New Zealand\",\"Description\":\"raceway.\}]}"

error i am getting is this

DataTables warning: table id=ivideos - Requested unknown parameter 'id' for row 0, column 0. For more information about this error, please see http://datatables.net/tn/4

i have the call code like thhis:

$('##ivideos').DataTable({
         'deferRender': true,
         'ajax': {
            'url': 'a.cfc?method=getvideos',
            "dataSrc": function (d) {
                return d
            }
         },
         'columns': [            
            { 'data': 'id' },
            { 'data': 'title' },
            { 'data': 'description' },
            { 'data': 'youtube' }
         ]
      }); //dataTable

using datatables version 1.10 onwards

CDN
  • 95
  • 7

1 Answers1

0

I don't have much experience with datatables, but it appears that column names are case sensitive as is usually the case with libraries, etc. that look for JSON properties. Fix the casing and try your method again. See this answer for more details:

djsoteric
  • 188
  • 1
  • 10