Skip to content

Get Value from Mapping

Overview

The Get Value from Mapping node retrieves a specific value from a mapping based on a provided key. It is commonly used to look up settings, translations, or associated data during flow execution. Mappings created can be consumed from Custom Mapping.

Use Get Value from Mapping when:

  • You need to retrieve a description corresponding to an error code.
  • You want to extract specific sensor data from a mapping of multiple readings.

💡 Tip

Use the success output to detect when key is missing from the mapping.

Inputs

NameTypeDescription
inputmappingThe dictionary to search within.
keydynamicThe key to look up in the mapping.

Outputs

NameTypeDescription
outputdynamicThe value associated with the key if found.
successbooltrue if the key exists in the mapping.

Parameters

This node does not have any configuration parameters.

Example

Error Message Retrieval

A flow receives an error code 404 and needs to display the matching message from a mapping: {"200": "OK", "404": "Not Found"}.

Configuration: This node has no configuration parameters.

Result: When the key 404 is provided as input, the node outputs "Not Found" via the output port, and success is set to true.

See documentation for Custom Mapping to see additional example how to create and use mapping.

Reference: