I have a fairly large form (50 fields) and I need to pass it into an API call.

Doing it in the javascript file would be pretty large to serialize all the data on the form into the proper model.

Is it possible to call the controller, and use the model from that to pass it through to the api url?

Basically I want to know an easy way to take my form data and turn it into serialized data based on my model.

thanks!

EDIT: Easy meaning that I don't have to take each form input and create my model with them

My code now is basically this below, but I would need to fill out a bunch of fields (I haven't tried it any other way)

```
 $("#submit").click(function () {
            var name = $("#Name").val();
            var address = $("#Address").val();
            var dob = $("#DOB").val();
            $.ajax({
                url: "http://localhost:49493/api/Values",
                type: "Post",
                data: JSON.stringify([name, address, dob]), 
                //instead of 3 fields, I would have 50
                contentType: 'application/json; charset=utf-8',
                success: function (data) { },
                error: function () { alert('error'); }
            });
        });

```