define column name with variable

Hi, is it possible to define column name using variable? Something like this

var colName1 = …

var colName2 = …

webix.ui({
view:“datatable”,

id:“my_datatable”,

columns:[
{id: colName1, header: colName1},

{id: colName2, header: colName2}

]})

Thanks a lot!

Hello,

Sure it’s possible. Webix components are configured via simple JSON objects.

http://webix.com/snippet/e0504c3f