Answer the question
In order to leave comments, you need to log in
How to load last column from json (google spreadsheets) to Datatables jQuery?
I need to display information from a googlespreadsheets table using the datatable plugin to a website.
The table itself
Data from the table in json
How can I display the last column with the price in the datable? And, accordingly, the date
$('#example2').dataTable( {
"paging": true,
"iDisplayLength": 7,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": false,
"autoWidth": false,
"bServerSide":false,
"bProcessing":true,
"sAjaxDataProp": "feed.entry",
"sAjaxSource": "https://spreadsheets.google.com/feeds/list/1f1k6jxo7eMdtBEK2M2PblmL2gNAXb2UnFAJA/1/public/values?alt=json",
"aoColumns": [
{
"mDataProp": "gsx$п.$t",
},
{ "mDataProp": "gsx$компания.$t", "defaultContent": "" },
{
"mDataProp": "gsx$_dkvya.$t", // _dkvya - заголовок поля даты генерируется автоматически, т.к. дата не строковый тип)
"defaultContent": ""
},
{
"mDataProp": "",
"defaultContent": "",
},
{ "mDataProp": "gsx$км.$t", "defaultContent": "" },
{ "mDataProp": "gsx$товар.$t", "defaultContent": "" }
]
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question