column title binding

column title binding

Stranger1Stranger1 Posts: 1Questions: 1Answers: 0

can I bind column's title? something like

var dataSet = {
data: [
{ "EngineData": "Engine 1" , "BrowserData": "Browser 1" },
{ "EngineData": "Engine 2" , "BrowserData": "Browser 2" }
],
title: [
{ "col1": "Engine" },
{ "col1": "Browser" }
]
}

$('#example').dataTable( {
    ...
    /*somehow bind dataSet*/
    ...
    "columns":
    {
        "data": "EngineData",
        "title":"col1"
    },
    {
        "data": "BrowserData",
        "title":"col2"
    },
} );   
This discussion has been closed.