#min
Returns the minimum of an array of numbers, optionally after a projection.
#min(array, @x: projection?)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
array |
path | array |
The numbers, or elements to project. |
projection (optional) |
lambda |
Selects the number from each element. |
Returns
Section titled “Returns”number
Examples
Section titled “Examples”Smallest number
Section titled “Smallest number”{ "numbers": [ 3, 1, 4 ]}{ "result": "#min($.numbers)"}{ "result": 1}