I have got a local JSON flat DataSource as shown below
var dataSet = [
[
"481.55",
"10.40"
],
[
"561.30",
"-2.55"
],
[
"368.20",
"33.45"
]
];
And i am using Jquery Datatables to display Data in tabular format this way
$(function()
{
$('#example').dataTable( {
"data": dataSet,
"columns": [
{ "title": "Price" },
{ "title": "Volume" }
]
} );
})
This is my jsfiddle
http://jsfiddle.net/cv04pp37/9/
With this the data is shown in this way
**
Price Volume
368.20 33.45
481.55 10.40
561.30 -2.55
**
I have got a javascript array as shown below where the first value refers to first value of the dataSet array and so on
var array_names =['ONE','TWO','THREE'];
My question is , Is it possible to display One more additional column Name in Jquery Datatables so that it looks like this
Name Price Volume
ONE 368.20 33.45
TWO 481.55 10.40
THREE 561.30 -2.55