Skip to content

Create Mapping

Overview

The Create Mapping node dynamically builds a dictionary by pairing elements from two parallel lists. It combines a list of keys with a list of values to create a single mapping object.

Use Create Mapping when:

  • You want to merge data from two different lists into a searchable dictionary.

💡 Tip

Ensure both the key and value lists have the same number of elements to maintain correct associations.

Inputs

NameTypeDescription
keylistThe list of keys to be used in the mapping.
valuelistThe list of values corresponding to the keys.

Outputs

NameTypeDescription
outputmappingThe resulting dictionary created from the input lists.

Parameters

This node does not have any configuration parameters.

Example

Merging Sensor Names and Readings

A flow receives a list of sensor names ["temp", "humidity"] and a list of readings from external inputs [22.5, 60.0].

Configuration:

  • No parameters.

Result: The node outputs a mapping: {"temp": 22.5, "humidity": 60.0}. This dictionary can then be queried by key name.

Reference: