Post array of inputs as object to controller, ASP.NET MVC
<p>I have ModelView</p>

<pre><code>public class GoalView
{
    public int MandatoryGoalID { get; set; }
    public string MandatoryGoalName { get; set; }
    public string MandatoryGoalTarget { get; set; }
}
</code></pre>

<p>my view with a list of inputs:</p>

<pre><code>                    @foreach (var item in Model.MandatoryGoals)
                    {
                        &lt;tr&gt;
                            &lt;td&gt;
                                &lt;div class="checkbox"&gt;
                                    &lt;label&gt;&lt;input type="checkbox" name="MandatoryGoalName[]" value="1"&gt;@item.GoalName&lt;/label&gt;
                                &lt;/div&gt;
                            &lt;/td&gt;
                            &lt;td width="40"&gt;
                                &lt;input disabled type="text" name="MandatoryGoalTarget[]" style="width: 40px;" value="@item.GoalTarget" class="form-control input-sm"&gt;
                                &lt;input type="hidden" value="@item.ID" name="MandatoryGoalID[]"&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    }
</code></pre>

<p>JS code</p>

<pre><code>             var userGoals = {
        MandatoryGoalID : $('input[name="MandatoryGoalID[]"]').serialize(),
        MandatoryGoalName : $('input[name="MandatoryGoalName[]"]').serialize(),
        MandatoryGoalTarget : $('input[name="MandatoryGoalTarget[]"]').serialize()
        };

    $.post('/Home/UpdateGoals', $.param(userGoals), function (data) {
    });
</code></pre>

<p>Controller </p>

<pre><code>   [HttpPost]
    public ActionResult UpdateGoals(List&lt;GoalView&gt; userGoals)
    {


        //return Content(userGoals.First().MandatoryGoalName);

        return Content("");
    }
</code></pre>

<p>Controller receive null object. What is wrong here? I need to receive an array of object GoalView.</p>

<p>Please help :)</p>

<p><strong>Updated</strong></p>

<p>Ok, i've fixed problem with list of objects in JS</p>

<pre><code>    var mandatoryTargetsValues = new Array();
    $('input[name="MandatoryGoalTarget[]"]').each(function () {
        mandatoryTargetsValues.push($(this).val());
    });
    var mandatoryNamesValues = new Array();
    $('input[name="MandatoryGoalName[]"]').each(function () {
        mandatoryNamesValues.push($(this).val());
    });
    var mandatoryIDValues = new Array();
    $('input[name="MandatoryGoalID[]"]').each(function () {
        mandatoryIDValues.push($(this).val());
    });


    console.log(mandatoryTargetsValues);
    console.log(mandatoryNamesValues);
    console.log(mandatoryIDValues);

    var ListOfMandatoryGoals= Array();

    var i;
    var obj = {};
    for (i = 0; i &lt; mandatoryTargetsValues.length; ++i) {
        obj.MandataryGoalID = mandatoryIDValues[i];
        obj.MandatoryGoalName = mandatoryNamesValues[i];
        obj.MandatoryGoalTarget = mandatoryTargetsValues[i];
        ListOfMandatoryGoals.push(obj);
    }

    console.log(ListOfMandatoryGoals);

    $.post('/Home/UpdateGoals', $.param(ListOfMandatoryGoals), function (data) {
    });
</code></pre>

<p>This code created array with all objects
But still controller receive NULL
Please help with it</p>

<p>Screenshot of object in Web console </p>

<p><a href="https://i.stack.imgur.com/Hkv3c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hkv3c.png" alt="enter image description here"></a></p>