Unable to use JSON.parse() after returning data

Unable to use JSON.parse() after returning data

belagodubelagodu Posts: 1Questions: 1Answers: 0

"ajax": {
"url": Ola.apiPath("/transactions/ccsearch"),
"type": "POST",
"data": function (data) {
return "q=" +$('#user_val').val() ;
},
"dataSrc": function(json) {
var ccObj = JSON.parse(json);
console.log("inside data src"+ccObj);
}
},

ERROR:
Uncaught SyntaxError: Unexpected token o

i have got the same error even when i use JSON.parse inside columns custom data function

could u please let me know wat could be the issue?

Answers

  • allanallan Posts: 64,042Questions: 1Answers: 10,557 Site admin

    We'd need a link to a test page showing the issue please.

    Allan

This discussion has been closed.