jquery - Populating Columns headings from JSON in bootstrap-table? -


i can how populate data json file on server (url: file.json), still need declare columns manually initiate bootstrap table.

i populate entire table according json information. possible?

current code:

function create_table_from_json() { $('#table').bootstraptable({         url: 'data.json',         columns: [{             field: 'firstname',             title: 'first name',             sortable: 'true'              }, {             field: 'lastname',             title: 'last name',             sortable: 'true'             }, {             field: 'desc',             title: 'description'             }, {             field: 'donotcall',             title: 'do not call'             }],          sortname:   'lastname',         striped:    'true',         search:     'true',         showcolumns: 'true'      }); } 

sidenote:
if has experience other table enhancement tools or plugins , wants recommend them great.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -