sort_by_values_by
function:
- Can also be called as
order_by_values_by
Sort an object by a function to it's values. If the first argument is an object, return object sorted by applying the second argumetn to it's values.
Examples:
- running:
(sort_by_values_by {"a": [1, 2, 3], "b": [1], "c": [2], "d": [3], "e": [0, null, 0]}, (.len))
will give:{"b": [1], "c": [2], "d": [3], "a": [1, 2, 3], "e": [0, null, 0]}
- running:
(sort_by_values_by false, .)
will return nothing