- Jun 6, 2020
- 11,559
- 4,422
I have the following json structure:
{
"item1": "abc",
"item2": 123,
"item3": true,
"item4": ["a", "b","c"],
"item5": [
[1,2,3],
["x","y","z"],
[
{"five20":["i","j","k"]},
{"five21":"opq"}
]
]
}
I have no problems (yet) with items 1 to 4 which have primitive data types.
Item5 is a List of 3 list items (multidimentional array) of different types of variables (Int, String, Map respectively)
I tried to access the 3rd element of item5 as follows:
B4X:
But I got the error:
java.lang.IndexOutOfBoundsExecption: Index: 2, Size: 2
Debug at breakpoint also shows that only the first two elements of item5 are recognized.
How can I access the third element which contains Maps?
{
"item1": "abc",
"item2": 123,
"item3": true,
"item4": ["a", "b","c"],
"item5": [
[1,2,3],
["x","y","z"],
[
{"five20":["i","j","k"]},
{"five21":"opq"}
]
]
}
I have no problems (yet) with items 1 to 4 which have primitive data types.
Item5 is a List of 3 list items (multidimentional array) of different types of variables (Int, String, Map respectively)
I tried to access the 3rd element of item5 as follows:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
But I got the error:
java.lang.IndexOutOfBoundsExecption: Index: 2, Size: 2
Debug at breakpoint also shows that only the first two elements of item5 are recognized.
How can I access the third element which contains Maps?
برای دیدن لینک ها باید ثبت نام کنید