sending hierarchical data from javascript over flat POST request
<p>I have a page on which user can dynamically create some identical groups of inputs, fill it and send to server.</p>

<pre><code>&lt;input type="text" name="firstName"/&gt;  
&lt;input type="text" name="lastName"/&gt;
</code></pre>

<p>What is a preferable way of sending this data to server? </p>

<p>Maybe there are some simple ways of emulating hierarhical data over POST request, avoiding XML structures? </p>

<p>Different "name" attribute values ("firstName1", "firstname2")?</p>

<p>Creating ID for each group or input? </p>

<p>Relying on the order of name-value pairs in the POST request? </p>

<p>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. </p>
