获取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);

 

posted on 2019-11-19 17:17  大山008  阅读(1073)  评论(0编辑  收藏  举报