I found this answer on stackoverflow, which I think addresses what you want to do.
It recommends using $('form').serializeArray() in jQuery - see serializeArray.
By the way, #explainlikeimfive is generally intended for questions of a general nature where you want to understand the "big idea" or the "view from above" for a given topic. For a more specific technical question like this one, I'd recommend using #help instead - thanks!
Thank you very much, I will take a look at it :D
I see! I actually didn't realize there was a #help section, I will make use of it in the future
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.