So for example, I would like to lookup the minimum value of “in” (which is 0 in the above) and get out the associated value of “out” (which is 1 in the above).
I can find the minimum value of “in” with:
Min[<|"in" -> #["in"]|> & /@ a]
but, since Lookup refers to the value against the key, not another value in the table, I can’t work out how to output the corresponding “out” value.
Thank you, and now that I understand how to do it & have played around with the code, I can also confirm that combining this into a single line, that avoids the need for a new parameter is possible: