I have the following 2 dimension array
data = [
[5014031, nil], [5014032, nil], [5014033, 0],
[5014034, nil], [3014035, 1], [5014036, 1],
[5014037, 2], [5014038, nil], [5014039, 2],
[5014040, nil], [2014041, nil], [3014042, 2]
]
When I know the value of the 1st integer of one of these arrays e.g. 5014034, what would be the most efficient way to gain the next integer value where the 2nd element matches to nil? (e.g. I would expect 5014038 to be returned)
Thanks Scott
5014040what is then the "next integer"?2014041because it is next in the array? Or ornilbecause there is no bigger integer than5014040with a 2nd element beingnil?