I am facing a challenge with posting Array data to an HTTP connector. My data is structured as follows:
var data = [{
key:'myKey',
keyName:'myKeyName',
value:'value',
valueName:'valueName'
}, {
key:'mySecondKey',
keyName:'mySecondKeyName',
value:'secondValue',
valueName:'secondValueName'
}, ...and so on ];
When attempting to post it via Ajax like this:
$.ajax({
type: "POST",
url: url,
data: data,
error: function(){
alert("Error");
},
success: function(){
alert("OK");
}
});
The request returns fine, but the posted data appears as
undefined=value&undefined=secondValue
I need all this information for configurations. How can I resolve this issue? Simple posts with keys and values work perfectly fine.