获取bootstrap table数据并封装 为json
var info = $("#table").bootstrapTable('getData'); var data = { instrumentId: instrumentId,timeSetList: []}; for (var i = 0; i < info.length; i++) { var timeSet = new Object(); timeSet.stTime = info[i].stTime; timeSet.edTime = info[i].edTime; data.timeSetList.push(timeSet); } var jsonString = JSON.stringify(data);