minBy
Find the element with the minimum value of a key extractor. Returns the entire element, not just the value.
array(required): array to searchfn(required): lambda(element) -> comparable
bash
echo '{"products": [{"name": "Widget", "price": 25}, {"name": "Gadget", "price": 150}, {"name": "Gizmo", "price": 10}]}' | utlx -e 'minBy($input.products, (p) -> p.price)'
# {"name": "Gizmo", "price": 10}