How to match Json data in datatable's Column Name
How to match Json data in datatable's Column Name
$(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