Thanks for sharing this link, I have however used this library. Things that I did not like in this because of the following reasons
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.