How to match Json data in datatable's Column Name

How to match Json data in datatable's Column Name

BalakrihBalakrih Posts: 1Questions: 1Answers: 0
edited November 2017 in Free community support

$(document).ready(function() {
$("#DepositDataTable").DataTable({
"processing" : true,
"serverSide" : true,
"ajax" : {
"url" : "DepositHistory",
"type" : "Post",
"success" : function(jsonResponse) {
console.log(jsonResponse);
}
},
"columns" : [ {
"title" : "Amount",
"data" : "amount"
}, {
"title" : "TransactionDate",
"data" : "transactionDate"
} ]
});
});

here I gave Jquery Code along with the Json Response From the Servlet
{"data":[ {"amount":200,"transactionDate":"01-01-1970 05:01 06"}, {"amount":200,"transactionDate":"01-01-1970 05:01 06"} ]}

the column name how I should write

This discussion has been closed.