Node-RED Match Node

1.0.2 · active · verified Sun Apr 19

node-red-contrib-match is a Node-RED package providing a dedicated node for advanced message filtering within a flow. It enables users to define multiple rules to check specific properties within an incoming message, or global/flow contexts, against static values, other properties, previous values, ranges, regex, types, and null/boolean states. Messages satisfying all defined rules are routed to the first output, while those failing any rule are sent to the second output. The current stable version is 1.0.2. Release cadence appears to be infrequent, primarily for bug fixes based on recent releases. Its key differentiator is the comprehensive set of comparison operators and the ability to probe deeply into objects and arrays, offering more granular control than standard switch nodes.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to install the Node-RED 'Match' node and provides conceptual guidance on its graphical use within the Node-RED editor.

// To use node-red-contrib-match, first install it into your Node-RED instance:
// npm install node-red-contrib-match

// After installation, restart Node-RED and locate the "Match" node in the palette.
// Drag it onto your flow, connect an input, and configure its rules via the
// editor's properties panel. For example, configure it to match `msg.payload === "hello"`.
// Connect the first output (match) to a debug node and the second output (no match) to another debug node.
// Inject a message with `msg.payload` set to "hello" to test the match.

// There is no direct programmatic JavaScript usage for this Node-RED node in application code.
console.log("Node-RED node 'node-red-contrib-match' is used graphically in the Node-RED editor.");

view raw JSON →