I have the following setup:
<input name="myInput[3][0]" type="text">
<input name="myInput[3][1]" type="text">
<input name="myInput[4][0]" type="text">
<input name="myInput[4][1]" type="text">
With php it is pretty easy to access the values after the form has been submitted. For example using a "post"-method the values of the inputs are stored in the multidimensional array $_POST['myInput']. Then the first element in each dimension can be accessed with $_POST['myInput'][3][0].
Is there a similar functionality in JavaScript that can be used even without submitting a form via the "post"-method?
Following JavaScript - get value from multiple inputs in an array, I added a class called "myInput" to each input-element, like
<input name="myInput[3][0]" type="text" class="myInput">
Then I tried this:
var myInput= document.getElementsByClassName('myInput');
But, unsurprisingly, this gives me only a 1-dimensional array not respecting any of the array keys. So not exactly the result sought for. (Also it seems odd to fiddle around with classes.)