I have an arraycollection of objects, each of which has a timestamp.
ex: {timestamp:4342423432, value:5}

I want to search the arraycollection for the object which has the 
closest timestamp to the time I'm looking for.
Is there a way to search the arraycollection for an approximate value?

As of right now I'm looping through each object in my arraycollection 
to find if the value is between 2 numbers.

for(var i:int = 0; i < dataProvider.length; i++) {
  if(myTimestamp > dataProvider[i] && myTimestamp < dataProvider[i+1])
    //this is the correct spot.
}

Reply via email to