- 3 minutes to read

Formula - Min

Easily find the minimum value in your data using the Min Formula in Nodinite. This page provides clear, real-world examples with a new, easy-to-read layout that separates input, formula, and result.

✅ Instantly get the minimum value from message body, Context, or nested formulas ✅ Use with XML, JSON, CSV, or plain text data ✅ Enhance your integration analytics with unique, reliable results

🎯 Design Note: The Min() function returns the lowest value extracted from your data.


What does the Min formula do?

The Min() formula returns the lowest value extracted from your data. Use it to analyze message payloads, context values, or results from other formulas in your log views and search fields.

graph LR A["Input: Values"] --> B["Min()"] B --> C["Result: Minimum Value"]

Examples

Below are practical examples showing exactly what input is used, the formula expression, and the resulting output.

Example 1: XML Message Body

Input - Example 1

<ns0:Orders xmlns:ns0="SupplyChain.Schemas/1.0">
  <Order>
    <Id>1337</Id>
    <Amount>666</Amount>
    <City>Grums</City>
    <Partner>QWNtZQ==</Partner>
  </Order>
  <Order>
    <Id>1338</Id>
    <Amount>42</Amount>
    <City>Karlstad</City>
    <Partner>QWNtZQ==</Partner>
  </Order>
</ns0:Orders>

Formula Expression - Example 1

Min(xpath('Orders/Order/Amount', body))

Result - Example 1

42

Example 2: JSON Message Body

Input - Example 2

{"a":[{"b":"1337"},{"b":"8"},{"b":"42"}]}

Formula Expression - Example 2

Min(jsonpath('a[*].b', body))

Result - Example 2

8

simpleBody

The result is 8 because it is the smallest value in the JSON array.


Example 3: CSV in Message Context

Input - Example 3

"face","suit","value"
"king","spades","13"
"queen","spades2","12"
#"jack","spades3","666"
"ten","spades4","10"

Formula Expression - Example 3

Min(csv(1,',',2,'#',context('Ids')))

Result - Example 3

10

csv Message Context

The result is 10 because it is the lowest value in the CSV context.


Features

  • Get the minimum value from any Content
  • Works with XML, JSON, CSV, plain text, or any valid formula plugin
  • Returns the minimum of unique values only
  • Ideal for integration analytics and data validation in Nodinite

Important

This plugin loads the entire message into RAM. For best performance, use it only on small messages.


How to use the Min formula

Syntax

  • From Message Body: Min(body, [bool unique = true])
  • From Message Context: Min(context('MessageContextKey'), [bool unique = true])
  • From Nested Formula: Min(SomeOtherFormula(Content), [bool unique = true])

Next step