Change, JSONata, or Function: Choosing a Node-RED Message Transformation Node
Choose Change for simple property moves, JSONata for read-only transforms, and Function only for complex logic in Node-RED flows.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Choose Change for simple property moves, JSONata for read-only transforms, and Function only for complex logic in Node-RED flows.
A practical function-node pattern for Node-RED that validates MQTT payloads defensively, normalizes output, reports health via node status, and persists state across restarts — plus the event-loop limits you need to respect.
A design goal is to process a large dataset in bounded chunks within a Node-RED flow. Data moves between nodes as msg objects and a Function node is intended to apply custom logic for chunking and forwarding results. State for pagination, such as a cursor or offset, needs to persist across successive messages. The Context API provides node, flow and global s
Understanding Node‑RED’s Execution Model Node‑RED runs each function node on the single Node.js event loop. A long‑running JavaScript loop inside a function node blocks the loop, delaying all other flows until completion. Current Workarounds The documentation recommends offloading heavy work to external services or using child‑process nodes (e.g., node‑red-n