JSFiddle - React, Tailwind, and code Playground
by Dominic Myers
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="container">
<table id="example" class="display compact" cellspacing="0" width="100%">
<thead>
<tr>
<th>Test header</th>
</tr>
</thead>
</table>
</div>
JavaScript
$('#example').dataTable({
"ajax": {
"url": "https://api.myjson.com/bins/vawiz",
"dataSrc": ""
},
"columns": [{
"data": "",
"defaultContent": null,
"render": (data, type, full) => {
var x = [];
(full["container-title"]) && x.push("Title: " + full["container-title"]);
(full["volume"]) && x.push("Volumns: " + full["volume"]);
(full["issue"]) && x.push("Issue: " + full["issue"]);
(full["page"]) && x.push("Page: " + full["page"]);
return x.join(', ');
}
}],
});