Alternative AJAX Data for Editor

Alternative AJAX Data for Editor

wyattbikerwyattbiker Posts: 25Questions: 14Answers: 0

Hi I prefer if the Ajax Data is in JSON format instead of the one below. That is hard to parse and also the row id is not separate.

from your example https://editor.datatables.net/examples/simple/inTableControls.html

action=edit
data[row_26][first_name]=Gavin
data[row_26][last_name]=Joyce
data[row_26][position]=Developer
data[row_26][office]=Edinburgh
data[row_26][extn]=8822
data[row_26][start_date]=2010-12-22
data[row_26][salary]=92575

How can I submit something similar to the response?

{
action: 'edit',
"data": [
{
"DT_RowId": "row_4",
"first_name": "Cedric",
"last_name": "Kelly",
"position": "Senior Javascript Developer",
"email": "c.kelly@datatables.net",
"office": "Edinburgh",
"extn": "6224",
"age": "22",
"salary": "433060",
"start_date": "2012-03-29"
}
]
}

Thanks!

This discussion has been closed.