I have a page on which user can dinamically create some identical groups of inputs, fill it and send to server.
<input type="text" name="firstName"/>
<input type="text" name="lastName"/>
What is a preferable way of sending this data to server?
Maybe there are some simple ways of emulating hierarhical data over POST request, avoiding XML structures? Different "name" attribute values ("firstName1", "firstname2")? Creating ID for each group or input? Relying on the order of name-value pairs in the POST request?
EDIT: of course i know about JSON. But just to use some minimal hierarchies i would like to follow the second answer: rely on the order of firstname-lastname in post request.