I have a multiple form inputs and they use arrays in their name. The form can be duplicated by the user. When the form is duplicated name of the input field changes accordingly. Basically this is what I have in my form
<div class="machine-stations">
<div class="property-container">
<input name="machine[process][0][system][100][station][52][name]" />
<input name="machine[process][0][system][100][station][52][price]" />
<!-- more input fields -->
</div>
</div>
<div class="machine-stations">
<div class="property-container">
<input name="machine[process][1][system][100][station][60][name]" />
<input name="machine[process][1][system][100][station][52][price]" />
<!-- more input fields -->
</div>
</div>
<div class="machine-stations">
<div class="property-container">
<input name="machine[process][2][system][100][station][40][name]" />
<input name="machine[process][2][system][100][station][52][price]" />
<!-- more input fields -->
</div>
</div>
What I am trying to accomplish is that I have to change the the number after [process] based on the .machine-stations index number. User can duplicate .machine-stations. If input field is contained in .machine-stations index 0 then the number after [process] should be 0 and so on. Thanks!