怎么传两组Json到后台啊
var userList = [];
userList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-04"});
userList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-05"});
userList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-06"});
userList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-07" });
var idList = [];
idList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-04" });
idList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-05" });
idList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-06" });
idList.push({ _strOptionalID: 1, _dtStartDate: "2017-05-01", _dtEndDate: "2017-05-07" });
$.ajax({
url: '/Home/Index',
type: 'post',
contentType: 'application/json',
data: JSON.stringify(userList),
async:true,
error: function (XMLHttpRequest, textStatus, errorThrown)
{
alert("数据错误!");
},
success: function (data)
{
if (data)
alert("保存成功!");
else (data)
alert("保存失败,请联系管理员!");
}
});