javascript - Need to access mData nested value in jquery datatable -
below api response,
{ "aadata":{"req":[{"requests":"132"}]}}
need show requests value in jquery datatable below code,
"aocolumndefs": [ { "atargets": [0], "mdata":"req[0].requests", },
but above code not working,but if change api reponse below,
{ "aadata":{"req":"132"}} "aocolumndefs": [ { "atargets": [0], "mdata":"req", },
above code working.....how can access requests value kind of response { "aadata":{"req":[{"requests":"132"}]}}
, anyhelp appreciated..
you can try follows
"aocolumndefs": [ { "atargets": [0], "mdata":"req[0]["requests"], }
instead of
"aocolumndefs": [ { "atargets": [0], "mdata":"req[0].requests", },
Comments
Post a Comment