JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.0/bootstrap-table.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.0/bootstrap-table.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.css">
<h1>TestDB</h1>
<table id="table">
</table>
JavaScript
$('#table').bootstrapTable({
url: 'https://api.myjson.com/bins/vawiz',
search: true,
pagination: true,
columns: [{
field: 'author',
title: 'Author',
formatter: function authorsFormatter(value) {
var authors = '';
for (var index = 0; index < value.length; index++) {
authors += value[index].given + ' ' + value[index].family;
// Only show a comma if it's not the last one in the loop
if (index < (value.length - 1)) {
authors += ', ';
}
}
return authors;
},
sortable: true
}, {
field: 'editor',
title: 'Editor',
formatter: function editorFormatter(value, index) {
if ((value) && (value[0].given)) {
return value[0].given + ' ' + value[0].family;
} else
return ' ';
}
}, {
field: 'issued.date-parts.0.0',
title: 'Year'
}, ]
});