I am trying to find the minimum values for all elements in a list of associations, below is an example
x = {<|"a"-> 4, "b"->9, "c"->15|>, <|"a"->21, "b"->11, "c"->1|>, <|"a"->12, "b"->3, "c"->21|>}
Required output for Min {<|"a"-> 2, "b"->3, "c"->1|>}
Required output for Max {<|"a"-> 21, "b"->11, "c"->15|>}
My attempt
for Max: MaximalBy[Values]@x
Result: {<|"a" -> 21, "b" -> 11, "c" -> 1|>}
for Min: MinimalBy[Values]@x
Result: {<|"a" -> 4, "b" -> 9, "c" -> 15|>}
Is there an elegant way to achieve this result?
agetting the value2? That value does not appear forain any of the associations. Similarly, why is the value ofcnot equal to21in the maximal result? – Shredderroy Dec 07 '18 at 06:30