I have a cshtml like the following
@using (Html.BeginForm("Save", "Plans", FormMethod.Post, new { @class = "form-horizontal", id = "floorplan-form" }))
{
@Html.TextBoxFor(m => m.FloorPlan.Name, new { placeholder = "Enter text", @class = "form-control" })
@Html.DropDownListFor(m => m.FloorPlan.GroupId, new SelectList(Model.FloorPlanGroups, "Id", "Name"))
}
In my javascript(in a separate javascript file), I'm trying to serialize this form and convert it into a JSON object.
var formData = $("#floorplan-form").serialize();
console.info(formData);
prints out
FloorPlan.Name=Test&FloorPlan.GroupId=15
And
var formData = $("#floorplan-form").serializeArray();
console.info(formData);
gives me:

I have tried doing this
var formData = JSON.parse($("#floorplan-form").serializeArray());
But I get this error:
Uncaught SyntaxError: Unexpected token o