var
formData= [];
$(
".form"
).each(
function
(n){
data = {};
fieldname = $(
this
).attr(
"name"
);
value = $(
).val() ||
""
;
data[fieldname] = value;
});
formData.push(data);