This Node-RED node, `truth-table`, provides a truth table functionality for evaluating expressions based on input data.
npm install @l3av/node-red-truth-tabletruth-table, provides a truth table functionality for evaluating expressions based on input data.
truth-table node by either using the Node-RED Editor's palette manager or by running the following command in your Node-RED user directory:
truth-table node evaluates expressions based on the input data and generates a result object. The node has the following properties:
path, stateExp, and issueExp. The path is used to extract a value from the input payload, and the stateExp and issueExp are JSONata expressions used to evaluate the state and issue for the extracted value, respectively. The expressions are defined in the following format: [{ "path": "", "stateExp": "", "issueExp": "" }, ...] .
input of the node. The outputs are generated based on the evaluation result:
render: The render level based on the evaluated expressions (ok, warning, or critical).
issues: An array of issues generated from the evaluated expressions.
raw_data: The original input data.