How do you show a json array as multiple options in searchpanes? (pictures included)
How do you show a json array as multiple options in searchpanes? (pictures included)
cms1
Posts: 11Questions: 4Answers: 0
Hello, I've looked up all I can but I can't seem to figure this out:
How can I turn this:
Into this:
Here an excerpt of the array in JSON:
nameOfDocument":"Ventilation of a Neonate",
authorDepartment":["Paediatrics Committee","Respiratory Therapy"]
This is the datatables script I'm using:
<script type="text/javascript">
$(document).ready(function() {
$('#policies').DataTable({
"ajax": 'data.txt',
"columns": [
{ "data": "nameOfDocument" },
{ "data": "authorDepartment[, ]" },
],
"searchPanes": {
cascadePanes: true,
},
dom: 'Pflrtip'
});
});
</script>
This question has an accepted answers - jump to answer
Answers
If anyone can point me towards a datatables resource page I'd appreciate it, I feel like I've tried them all to no avail
Does this example help?
Kevin