List Min
Find the minimum numeric value in a list. Accepts an array of numbers or numeric strings and returns the smallest value along with its index. Useful for finding lowest prices, smallest balances, cheapest options, etc.
Built-in action Built In
Find the minimum numeric value in a list. Accepts an array of numbers or numeric strings and returns the smallest value along with its index. Useful for finding lowest prices, smallest balances, cheapest options, etc.
At a Glance
| Field | Value |
|---|---|
| Action ID | list-min |
| Category | Built In |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | utility, transformer, list, min, minimum, aggregate, math |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
values | array | Yes | Array of numbers or numeric strings to find the minimum of. Supports workflow variables like {{node.result.prices}}. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
result | string | Yes | The minimum value as a string. |
index | number | Yes | Zero-based index of the minimum value in the original array. |
Examples
json{ "type": "list-min", "payload": { "values": [ 10, 5, 20, 3, 15 ] }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/list-min/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "values": [ 10, 5, 20, 3, 15 ] }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
