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="example">
<th class="hidden-480">Price</th>
<th class="hidden-480">Volume</th>
<th class="hidden-480">Volume</th>
</table>
JavaScript
var dataSet = [
[
"481.55",
"10.40"
],
[
"561.30",
"-2.55"
],
[
"368.20",
"33.45"
]
];
var array_names =['ONE','TWO','THREE'];
$(function()
{
$('#example').dataTable( {
"data": dataSet,
"columns": [
{ data: 0 },
{ data: 1 },
{
"mDataProp": "My_New_Column_Name" ,
mRender: function(data, type, row){
for(var i=0;i<array_names.length;i++)
{
return array_names[i];
}
}
}
]
} );
})