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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -