Handling varying number of elements in jquery ajax
I'm writing an application where the number of fields in a form is interactive.
The user can add as many fields as they want.
When they hit save, I would like all the fields to be saved.
My question is how to handle the varying number of fields with an ajax POST function?
My problem is that the ajax post function needs to know ahead of time which elements will be saved, but by having the number of elements change, I don't know how to handle this...
Any thoughts/ideas on what path I should follow?