Code: Select all
array:=[1:"a",3:"b",1000:"c"]
Using for-loop is not an option since this line will be called millions of times.
I could get all keys before calling this line, if needed.
Perhaps Enumerator Object could do the trick?
Code: Select all
array:=[1:"a",3:"b",1000:"c"]
Code: Select all
array:={1:"a",3:"b",1000:"c"}
linked := {}
for key in array
{
if (A_Index > 1)
linked[previous_key] := key
previous_key := key
}
MsgBox % linked[3]
Users browsing this forum: No registered users and 333 guests