JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
<table id="allwl">
<th class="hidden-480">Price</th>
<th class="hidden-480">Volume</th>
<th class="hidden-480">Quantity</th>
</table>
JavaScript
var dataSet = [
[
"1441.75",
"100"],
[
"1614.45",
"50"
],
[
"834.15",
"3000"]
];
var array_names = ["APPLE", "WHIRLPOOL", "SAMSUNG"];
for (var key in dataSet) {
if (dataSet.hasOwnProperty(key)) {
dataSet[key].splice(0, 0, array_names[key]);
}
}
$(function () {
$('#allwl').dataTable({
"iDisplayLength": -1,
"data": dataSet,
"columns": [{
"title": "Name"
}, {
"title": "Price"
}, {
"title": "Quantity"
}]
});
})