I have a list of the form
{
{1, {3., ∞, ∞, ∞}},
{2, {1.,1., ∞, ∞}},
{3, {0.333333, 0.666667, ∞, ∞}}
}
and I would like to sort it by the minimal of the nested list inside each element, namely, Min[{1.,1., ∞, ∞}]
etc. The result should be
{
{3, {0.333333, 0.666667, ∞, ∞}}
{2, {1.,1., ∞, ∞}},
{1, {3., ∞, ∞, ∞}},
}
I tried SortBy[x,Min[Last]]
but the result is unexpected. Any help?
SortBy[lis, Min[Last]]
works for me on V 12. Why did it not work for you? $\endgroup$