I have associations look like this:
data = {<|a -> {2, l1}, b -> {3, l1}|>, <|a -> {3, l2}, b -> {2, l2}|>}
I want the result:
<|a -> {3, l2}, b -> {3, l1}|>
The bigger digit of first value should be left.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityMerge[data, First @* MaximalBy[First]]
<|a -> {3, l2}, b -> {3, l1}|>