I have the following array object
[{"site":"88333","event":"TEST","event_window":"4th April - 4th April","monitoring_start":"10-Apr-2016","monitoring_end":"10-Apr-2016"}]
I am trying to pass on ajax post as key value. I can have multiple rows. I have tried $.param(JSON.stringify(json_o)) and $.param(json_o), which does not work
Example shown here looks like array object which I have done but does not work.
var params = JSON.stringify(json_o);
console.log(params);
$.ajax({
url : '../../api/netcool/add-event',
data : params,
type: 'POST',
error : function (data, textStatus, jqXHR) {
if(data.statusText != "abort")
console.log(data);
},
dataType : 'json',
success : function (data) {
console.log(data);
}
});
datain your$.ajaxrequest.$.ajax({ url : 'someurl', data : your_array[0] })