# Find and return the key with lowest value in association list

I am still new in Mathematica, and I need some help here. Suppose that I have an association

A=Association[1 -> 1, 2 -> 1, 3 -> 4, 4 -> 6, 5 -> 4, 6 -> 4, 7 -> 2, 8 -> 2, 9 -> 2, 10 -> 1, 11 -> 4, 12 -> 1, 13 -> 3, 14 -> 2, 15 -> 3, 16 -> 1]


and I want to get the output of key with the lowest value, which is

{1, 2, 10, 12, 16}


I know that ArgMin can't get my desired answer. So I tried Position[A, Min[A]], but instead it gives me the output

{{Key[1]}, {Key[2]}, {Key[10]}, {Key[12]}, {Key[16]}}


Is there a solution?

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Apr 26 '15 at 16:46
• You still "will need some help here" after many a years :) – eldo Apr 26 '15 at 17:53
• PositionIndex[#][Min@#] &[A] (see here) – user1066 Jun 27 '17 at 23:57

Keys @ MinimalBy[Value]@ A

{1, "2", 10, 12, 16}

About your approach, you can add Part:
Position[A, Min[A]][[All, 1, 1]]