Appearance
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
| Name | Type | Description |
|---|---|---|
| input | mapping | The dictionary to search within. |
| key | dynamic | The key to look up in the mapping. |
Outputs
| Name | Type | Description |
|---|---|---|
| output | dynamic | The value associated with the key if found. |
| success | bool | true 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.
Related links
Reference:
- Custom Mapping — create a static dictionary for lookups
- Create Mapping — build a dictionary dynamically from two lists
- Dynamic Selector — branch logic based on mapping values