DEV Community

Discussion on: HTML form input to nested JSON objects?

Collapse
 
nestedsoftware profile image
Nested Software • Edited

I found this answer on stackoverflow, which I think addresses what you want to do.

It recommends using $('form').serializeArray() in jQuery - see serializeArray.

Once you have that object, you can use javascript to create a copy that has any modifications you might want to make before sending it to the backend API...

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!

Collapse
 
jouo profile image
Jashua

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