I'm getting error in the method $.toJSON(batch)
that object does not support this property or method. How can i pass batch array using $.toJASON(batch)
method?
$.ajax({
type: 'POST',
contentType: 'application/json; charset=utf-8',
url: '@Url.Action("BatchUpdate", "Home")',
dataType: 'json',
//data: '{viewModelsBatch: '+batch+'}',
data: $.toJSON(batch),
success: function(result) {
//...
$('#jqgProducts').trigger('reloadGrid');
}
});