datatable single line(ajax)
datatable single line(ajax)

I want to make a single line table into a datatable. Is it possible?
I am using ajax. My json is this.
{
name: "Tiger Nixon",
position: "System Architect",
salary": "$320,800",
}
I did it like below, a message saying 'No data available in table'
And type error.
data : data,
columns : [
{"data" : "name"},
{"data" : "position"},
{"data" : "salary"},
]
Please answer.Thanks
This discussion has been closed.
Answers
That should work - look at this example here, it's doing just that. Ensure the data is the correct format, you can see what's being sent on the Ajax tab, or the browser's network tab in the developer tools.
Colin