Datatable problems
Datatable problems
Hi friends,
I need a cell with several results. For example a list.
I have the json file:
{
"data":
[
{"author": [{"name": "name 1"},{"name": "Name 2"}]}
]
}
How can show this information. I try with:
$('#example').DataTable( {
// 1. Crea un Datatable con el contenido del fichero ordenadores.xls.
"ajax": 'test.json',
"columns": [
{ "data": "author" }
],
} );
} );
.. and show [object Object],[object Object].
I try too:
$(document).ready(function() {
$('#example').DataTable( {
// 1. Crea un Datatable con el contenido del fichero ordenadores.xls.
"ajax": 'test.json',
"columns": [
{ "data": [
{ "author": "name" }
] }
],
} );
} );
I need help please.
Thank you all !!
This question has an accepted answers - jump to answer
Answers
Take a look at this first example for the columns render option:
https://datatables.net/reference/option/columns.render#Examples
Kevin
Great!!!
Thanks Kevin