Skip to main content

Min Array

This node finds the minimum value in an array.

The Min Array node scans an array to find the smallest element.

The Min Array node takes an array as input and returns the minimum value found within it. It supports arrays of numbers (finding the smallest number), strings (finding the first alphabetical value), and objects (using a key path).

Inputs

Input

DataDescription
ArrayThe array to scan. Can contain numbers, strings, or objects.

Object Options

DataDescription
Key PathRequired if the array contains objects. Specifies the property path to compare (e.g., "cost").

Actions

SignalDescription
DoTriggers the calculation. The result is updated only when this signal is received.

Outputs

Data

DataDescription
MinimumThe smallest value found in the array.

Signals

SignalDescription
DoneTriggered when the calculation is successfully completed.

Usage

Use this node to find valleys, lowest prices, or starting boundaries.

Example Use Cases

  1. Best Price: Find the lowest price in a list of product objects.
    • Array: Products.
    • Key Path: "price".
  2. Data Analysis: Find the lowest value in a dataset.
  3. Alphabetical Sort: Find the "first" word in a list (e.g., "Apple" < "Zebra").

Detailed Behavior

  1. Numeric Arrays: Uses Math.min() logic.
  2. String Arrays: Sorts alphabetically and returns the first item.
  3. Object Arrays: Extracts values using Key Path before comparing.
  4. Empty Array: Returns 0 if the array is empty.

Troubleshooting

  • Result is 0: If the array is empty, the result defaults to 0.