**How to read and Retrive Json from Datatable geting _aData**
**How to read and Retrive Json from Datatable geting _aData**
eusebiogerman
Posts: 1Questions: 0Answers: 0
Example:
function **readjson() {
data = table_det.rows('.selected').columns().cells().context[0].aoData;
**for(let i=0; i<data.length;i++)
{
id = table_det.rows('.selected').columns().cells().context[0].aoData[i]._aData[1]);
console.log(id)
}
Replies
Please provide details of what you are trying to do so we can offer suggestions.
If you want to read the JSON us
ajax.json()
.If you want the row data use
rows().data()
. See this example of using the select extension to get the select rows.Kevin
Just to add to what Kevin said,
_aData
is an internal property. If you are reading from it, then you are doing it wrong . Use the API such as the two methods Kevin suggested orcell().data()
for a specific cell.Allan