Formula - equal
Easily check if values are equal using the Nodinite equal Formula plugin. This page shows how to compare message Content, Context, or the output of other formulas, ensuring your integrations are accurate and reliable.
π― Designed for business users and integrators β no developer required; you can even use AI to craft expressions.
- β Instantly validate if values are equal for data consistency from any Payload or Context in any Log Event
- β Boolean result (true/false) for conditional logic and filtering
- β Transform and surface meaningful data in Nodinite Log Views, search filters, and self-service diagnostics
- β Combine with other Formula functions for powerful, layered expressions
What does the equal Formula do?
The equal(<Expression>, <Content>, ..., <Content>, <MatchAllValues>) Formula function checks whether two or more text values are equal. It returns true if the values match, and you can specify if all or just one value must match.
How it works: Input β equal β Result
Flow: Multiple values are compared against a specified expression, returning a boolean result.
Parameters
<Expression>β A string or expression to compare against<Content>β One or more values to compare<MatchAllValues>β Boolean (trueorfalse). Iftrue, all values must match; iffalse(default), only one match is required
Examples
Below are practical examples showing how to check if values are equal.
Example 1: Check if Message Body Equals Value
Input
GMT
Formula Expression
equal('GMT', body())
Result
true
Example: Checking if message body equals a value
Example 2: Check if Context Value Equals Value
Suppose you have a message context value with the key id containing GMT.
Input
GMT
Formula Expression
equal('GMT', context('id'))
Result
true
Example: Checking if context value equals a value
Example 3: Check if Result from Another Formula Equals Value
You can use the result of another formula function as input. For example, extracting values with regex and checking if they equal a specific value.
Input
GMT UTC
Formula Expression
equal('UTC', regex('GMT|UTC', body()))
Result
true
Example: Using another formula as input for equal
Example: Using another formula as input for equal with message context
Features
The equal Formula function is highly flexible and can be nested with other formula functions. For instance, combine it with regex, jsonPath, or substring to validate extracted or transformed data.
- Check if two or more values are equal for data validation
- Returns boolean
trueorfalsefor conditional logic - Option to require all values match or just one match
- Works with message body, Context, or results from other Formula functions
- Ensures data integrity across integrated systems
Important
The equal plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.
How to use
The equal formula validates if values match a specified expression. It's ideal for equality checks, data validation, or conditional filtering.
Syntax
equal('Expression', Content1, Content2, ..., MatchAllValues)
Parameters:
- Expression (string): The value to compare against, e.g.,
'GMT','Success','200' - Content (string): One or more values to compare, typically from body() or context()
- MatchAllValues (boolean, optional): If
true, all values must match; iffalse(default), only one match is required
Common patterns:
equal('GMT', body())β Check if body equals "GMT"equal('Success', context('status'))β Validate status equals "Success"equal('UTC', regex('GMT|UTC', body()))β Check if extracted value equals "UTC"
Use with different sources:
- Check message body:
equal('value', body()) - Check message context:
equal('value', context('MessageContextKey')) - Check formula result:
equal('value', regex('pattern', body()))
Next step
- How to Add or manage Search Fields
- How to Add or manage Log Views
Related Topics
- Body β Extract body from the Log Event
- Context β Extract context values from the Log Event
- notEqual β Check if values are not equal
- endsWith β Check if text ends with a specific value
- startsWith β Check if text starts with a specific value
- Expression Type Plugins are used in Search Fields
- What are Search Fields?
- What are Search Field Expressions?
- What are Message Types?
- What are Log Views?



