can I use a plain array with datatable

edited July 2014 in Technical questions

Hello
Newbie here. Help will be appreciated.
I have an array of strings being returned as json from a url: ['a','b','c','d']
How do I use these in a one column datatable? The datatable wants an array of objects : [{item:'a'},{item:'b'},{item:c},{item:'d'}]

webix.ui({
    container: 'url-table-div',
    autoheight: true,
    autowidth: true,
    view: 'datatable',
    url: '/urls',
    columns:[
        {id:'item', header:'URL', adjust:'data', sort:'string'}
    ]

});
This works but I want to pass straight array to the datatable instead of array of objects.
Thanks

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion