Thank you so much. This is what I needed. Just a quick question, can you please tell me what does
a[a == b] do? I have never seen it before.
Also, in your example, if there is no matching for 3, so it would not return a value for that?
Thanks again!