I have a 2D Array uint[][100] myArray
. I want to access the length of the first dimension (the dynamic array). Therefore I use myArray.length
, but then I get the value 100
the length of the second dimension (the static array).
How can I get the the length of the first dimension?
myArray[0].length
obviouslymyArray[0].length
I would expect 100myArray.length
gives the length of the dynamic part andmyArray[0].length
of the static part, that is100
.myArray.length
. AtmyArray[0].length
you should expcet however many elements you've pushed there.