Extracting data from a table in json format

Extracting data from a table in json format

chiragsagichiragsagi Posts: 6Questions: 2Answers: 0

Do we have any inbuild feature with which we can extract the table data into a json structure format like below:

FYI: Below format is the same we import while loading the data
Eg:
{
"data": [
{
"DT_RowId": "row_1",
"first_name": "Tiger",
"last_name": "Nixon",
"position": "System Architect",
"email": "t.nixon@datatables.net",
"office": "Edinburgh",
"extn": "5421",
"age": "61",
"salary": "320800",
"start_date": "2011-04-25"
},
{
"DT_RowId": "row_2",
"first_name": "Garrett",
"last_name": "Winters",
"position": "Accountant",
"email": "g.winters@datatables.net",
"office": "Tokyo",
"extn": "8422",
"age": "63",
"salary": "170750",
"start_date": "2011-07-25"
}
]
}

Thanks in advance.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    If you're using ajax, you can call ajax.json() to get the last JSON sent to the table. Otherwise, no, I'm afraid,

    Colin

This discussion has been closed.