Android Question Get specific value from multi-dimentional array in list

rkxo

Active Member
Licensed User
Longtime User
Hi,
How i get specific value direct from multi- dimetional array value?
For example

I have
B4X:
array (0) -->(0) value1

             (1)value 2


array (1) -->(0) value1

             (1)value 2

How i get (value 2) from (array1) .In list only can get array but not in sub values

B4X:
dim Values as list
for i=0 to 3
values.add(Array As String(value1, value2))
next

' get values? array 1 value2?
values.get(???)

Thanks
 

stevel05

Expert
Licensed User
Longtime User
There is no way to tell in advance what type of data a List holds, it could be anything. You need to cast the object to the correct type first then read the values.

B4X:
Dim StrArr() as String = values.get(0)
For each S As String In Strarr
    Log(S)
Next

'Or

Log(StrArr(0))
Log(StrArr(1))
'etc.
 
Upvote 0
Top