I had to turn to your help guys, thanks in advance
So, I need to have this structure:
Code: Select all
MyArray
option_1
index_1
value
index_2
value
index_3
value
index_4
value
index_5
value
option_2
index_1
value
index_2
value
index_3
value
MyArray[option_2].Count() ; It should give 3, not 5, which is the "option_1"
I am facing a challenge because by using the Insert() method doesn't nest beyond two indexes (two nested arrays). I can do this:
; here "option_handler" is "option_1"
MyArray.Insert(option_handler, {"index": index_value, "value": value_handler})
But that will give this kind structure
MyArray
option_1
index_1
value
option_1
index_2
value
option_1
index_3
value
The "option_1" values are separated, what I need is for those to be nested within "option_1", like in the structure I set in the beginning
This would be my ideal alternative, which is not working
MyArray.Insert(option_handler, { index_value, {"value": value_handler}})
Notes
"option_handler" is a variable that will change depending on the option ("option_1" or "option_2")
"index_value" is a variable that will change depending on the index_value("1", "2", "3"...)
"value_handler" is a variable that will change depending on the value_handler("aa", "bb", "cc"...)
Any recommendation is appreciated!