Sending form data made easy with – diver.js
github.com
github.com
I use it when I need to process a form and just send the relevant "data" part (or all of "data") upon "sumbit" being fired off.
1. I cannot put the values of one object inside the other unless they come under the same parent.
2. Arrays in my case can be created in one go and you need not specify the array indexes hard coded in the html itself.
3. In my case some inputs were not inside any forms. This library mandates that it should be so it did not work for me.
I understand my code will be far less sophisticated but I made it to solve a problem and learn javascript as well. I did and wanted to see how many others face the same problem and can use it.
Here is a list of even more sophisticated libraries that might help you as well
https://www.npmjs.com/search?q=form+serialize
Someone already posted this link earlier here.