I am trying to serialize all inputs in a specific form into an object array so that I can pass it to my controller action and then update multiple rows at once. My issue is the serializing part... It's messing up somehow.
Here is where I generate the form:
$.each(content, function (i, item) {
var html = "<br />Choice ID<br /><input type='text' name='QuestionChoicesId' value='"
+ item.QuestionChoicesId + "'><br />Choice Display Text<br /><input type='text' name='DisplayText' value='"
+ item.DisplayText + "'><br />Order of Display<br /><input type='text' name='OrderNumber' value='"
+ item.OrderNumber
+ "'>";
$(html).appendTo("#choices");
});
This is what i am trying to do:
console.log($('#choices :input').serializeArray());
$.ajax({
type: "POST",
url: "/Question/UpdateQuestionchoices/",
data: $('#choices :input').serialize()
});
Here is the console.log output:

It should be an array of objects with QuestionChoicesId, DisplayText, and OrderNumber for each object.