What will the column value be?

What will the column value be?

HoskinsHoskins Posts: 1Questions: 1Answers: 0

Hello all.

Given the below JSON,

[{\"email\":\"test1@abc.com\",\"email_verified\":false }]

What will be the 'data' value when constructing the table?

The below doesn't seem to work. However, if i remove the escape characters () from the JSON it works (middleware seems to force this escape character so cant remove at source).

$(document).ready(function () {
$('#Test').DataTable({
searching: false,
ordering: true,
ajax: {
url: "http://localhost:58893/Users/GetTest",
dataSrc: ''
},
columns: [
** { data: "email" },
{ data: 'email_verified' }**
]
});

Any help much appreciated.

Answers

  • allanallan Posts: 64,943Questions: 1Answers: 10,757 Site admin

    [{\"email\":\"test1@abc.com\",\"email_verified\":false }]

    That isn't valid JSON. Is that what the server is actually returning?

    Allan

This discussion has been closed.