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