this is my serializeArray.I want get only these 2 push attributes only.other elements in form don't necessary. how to remove others and only keeps these two push values(Attributes and Actions)
var a = this.serializeArray();
a.push({name: "Attributes", value:RuleConfigs.attributeContainers});
a.push({name: "Actions", value:RuleConfigs.actionsContainers});
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};
this is where I call it.
var option=$('form').serializearray();