I have multiple check box values in a form. I am serializing the form and send to mvc controller as JSON data. How can i de-serialize the check box values?
This is my html -
@using (Html.BeginForm("SaveOfficeConfiguration", "Offices", FormMethod.Post, new { Id = "frmOfficeConfigSave" }))
{  
<div id="divOfficeForm">
    <div style="width: auto; height: auto; border: 3px outset silver;">
        <table class="mainsectionable" width="100%">
            <thead>
                <tr>
                    <th style="text-align: center;">
                        <center>KCCM Profile Access</center>
                    </th>
                </tr>
                <tr>
                    <td>
                        @using (Html.BeginForm())
                        {
                            IEnumerable<SelectListItem> Brands = ViewBag.GetBrands;
                            foreach (var item in Brands)
                            {
                            @Html.CheckBox("KCCM_Brands", false, new
                                                        {
                                                            value = item.Value
                                                        });
                            <label>@item.Text</label><br />
                                            }
                                        }
                    </td>
                </tr>
            </thead>
        </table>
    </div>
</div>
}
This is my javascript function-
function SaveOfficeConfigNew() {
    var officeID = $('input[name="hdnOfficeID"]').val();
    var url = "/OfficeManagement/Offices/SaveOfficeConfiguration?officeID=" + officeID;
    ShowWait();
    $.ajax({
        type: "POST",
        url: url,
        data: frmOfficeConfigSave.$('input').serialize(),
        success: function (data) {
            HideWait();
            alert(data.msg);
        },
        error: function (data) {
            HideWait();
            alert(data.msg);
        }
    });
    applyFilter();
    return false;
}
This is my gonna be controller action -
[HttpPost]
    public ActionResult SaveOfficeConfiguration(int ? officeID, FormCollection form)
    {
        try
        {
            */..............
              ..............*/
            return Json(new
            {
                success = true,
                msg = String.Empty,
                id = 1
            }, JsonRequestBehavior.AllowGet);
        }
        catch (Exception error)
        {
            return Json(new
            {
                success = false,
                msg = error.Message,
                id = -1
            }, JsonRequestBehavior.AllowGet);
        }
    }
 
     
     
     
    