0

i have json with \ escape (as seen in chrome inspector):

"[{\"Id\":3,\"Email\".....

When i try to populate jQuery Datatables i get the following error:

Requested unknown parameter 'Id' for row 0

In my javascript:

table = $('#UserTableList').DataTable({
    ajax: {
        url: '/User/GetUsers',
        dataSrc: ''
    },

    columns: [
        { data: 'Id' },
        { data: 'Email' }]
});

The problem is the \ escape in the json?

Tom
  • 4,007
  • 24
  • 69
  • 105
  • Please show a full example of the returned "JSON". You obviously also have a problem with the serverside script, you could post that too. – davidkonrad Dec 04 '15 at 17:00
  • Correct the code on the server to produce valid response in JSON format. You can always use http://jsonlint.com to validate your JSON. – Gyrocode.com Dec 04 '15 at 20:03
  • That's what chrome inspector indicates, your json doesn't have those "\". see the raw data. – Hedeshy Dec 06 '15 at 06:37

0 Answers0