.png)
The Map Keys operator updates multiple key names in a table. For example, imagine you have a Data Table component using column headers named name1, name2, age, and income. You can rename keys like name1 and name2 to firstName and lastName using the Map Keys operator. It uses a mapping table that specifies which keys to replace and their new names. The operator automatically applies these updates across all objects in your array.
Tables store as an array of objects, with each object representing one row. Each column and its corresponding value in that row form a key/value pair.
Examples of when to use the Map Keys operator include:
Removing spaces from key names to prevent future errors.
Aligning key names from imported data with your current naming standards.
Renaming confusing or unclear keys when presenting data to end-users. For example, converting camel case to title case before exporting to CSV.
Simplifying long or complex key names from external API data to make them easier to reference in your workflows.
You’ll find the Map Keys operator under the Table group to the left of the Data Workflow canvas.
Similar Data Workflow Operators
The Map Keys, Map Values, and Create Field operators are closely related but serve different purposes.
Here are the comparisons:
Map Values operator: The Map Values operator lets you update the values in a set of key/value pairs. By comparison, the Map Keys operator lets you update the keys in a set of key/value pairs.
Create Field operator: Similar to the Map Values operator, the Create Field operator can update values in key/value pairs. However, the Create Field operator lets you use conditional logic with if statements and does not rely on a mapping table. Instead, you define the value changes directly in the operator’s Info window.
About the Info Window
Here's a breakdown of each setting in the Map Keys operator’s Info window:
Setting | Description |
|---|---|
Category | Grayed out and non-adjustable setting indicating the operation type. |
Label | Sets the label for your operator, displaying below the operator on your Data Workflow canvas. This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows. |
Preserve Argument Type | When selected, this setting ensures the argument data type is respected when the operator executes. |
Source Column | Enter the name (column header) of the column in your mapping table that defines the original key names. |
Target Column | Enter the name (column header) of the column in your mapping table that defines the new key names. |
Adding a Map Keys Operator
In this example, use a Map Keys operator to update the keys in key/value pairs in an array of objects. Because the Map Keys operator lets you update table-based data, begin by configuring a Data Table component.
You can use the Map Keys operator with any table-based data, not just data from a Data Table component. For example, you can use the operator with data returned by the List Submissions for Dashboard API call. You can set up a Hidden component to store the data from the API call. Then, you'll use a simple Input-to-Output Data Workflow to move the data from Plug-In to Hidden component. The Hidden component is then used as the input in your Map Keys Data Workflow.
These instructions assume you have a new module open, saved, and with a title.
Configure the First Data Table Component
Configure a Data Table component that can be used as a data source. Create sample column headers that you can update later.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID field, enter
dtData.In the data table, enter the following:
#
A
B
C
D
1
name1
name2
age
income
2
Minna
Amigon
34
77000
3
Mitsue
Tollner
46
102000
4
Abel
Maclead
31
65000
5
Sage
Wieser
49
121000
.png)
Click Save Component.
Configure the Second Data Table Component
Create a two-column table that acts as a mapping table. In the first column, oldKey, list all the keys you want the Map Keys operator to update. In the second column, newKey, list the new key names. Then, reference the mapping table's column headers in the Map Keys operator's Info window. Let's update the name1 key to be firstName and the name2 key to be lastName.
Drag and drop a Data Table component onto your canvas, placing it below the
dtDataData Table component.In the Property ID field, enter
dtMapping.In the data table, enter the following:
#
A
B
1
oldKey
newKey
2
name1
firstName
3
name2
lastName
You can list the keys you want to change in any order in the oldKey column. As long as the keys exist in the data source, the Map Keys operator will know to update them. You don't need to include quotation marks around your key names.
.png)
Click Save Component.
Configure the Hidden Component
Next, you'll configure a Hidden component to store your final table. You'll reference it later in your Data Workflow.
Drag and drop a Hidden component onto your canvas, placing it below the
dtDataanddtMappingData Table components.In the Property ID and Label Text fields, enter
updatedTable..png)
Click Save Component.
Configure the Data Workflow Component
Next, let's create the Data Workflow. With the help of your mapping table, the Map Keys operator in the Data Workflow will update the name1 and name2 keys.
Drag and drop a Data Workflow component onto your canvas, placing it below the
updatedTableHidden Component.In the Property ID and Canvas Label Text fields, enter
dwfMapKeys.
Configure the Input Operators
Drag and drop two Input operators onto your Data Workflow canvas.
Configure the first Input operator's Info window as follows:
Setting
Value
Category
Input
Component
dtData
Required
Yes
Source
Default
Configure the second Input operator's Info window as follows:
Setting
Value
Category
Input
Component
dtMapping
Required
Yes
Source
Default
Configure the Console Operators
Next, add a pair of Console operators so you can compare the before and after of the Data Workflow. One will display the data before using Map Keys, and the other will serve as a reminder of how you set up your mapping table.
Drag and drop two Console operators onto your Data Workflow canvas.
Configure the first Console operator's Info window as follows:
Setting
Value
Category
Console
Label
Mapping Table
Connect the output port (right) of the
dtMappingInput operator to the input port (left) of theMapping TableConsole operator.Configure the second Console operator's Info window as follows:
Setting
Value
Category
Console
Label
Before Map Keys
Connect the output port (right) of the
dtDataInput operator to the input port (left) of theBefore Map KeysConsole operator.
Configure the Map Keys Operator
Now you're ready to set up the Map Keys operator. Notice that the values you'll enter in the Info window's Source Column and Target Column fields match the column headers in the dtMapping Data Table component, which is your mapping table.
The Map Keys operator has two input ports. Always connect the data source to the upper input port and the mapping table to the lower input port.
Drag and drop a Map Keys operator onto your Data Workflow canvas.
Complete the operator's Info window as follows:
Setting
Value
Category
Map Keys
Label
Map New Key
Source Column
oldKey
Target Column
newKey
Connect the output port (right) of the
dtDataInput operator to the upper input port (left) of theMap New KeyMap Keys operator.Connect the output port (right) of the
dtMappingInput operator to the lower input port (left) of theMap New KeyMap Keys operator.
Configure the Third Console Operator
Next, let's add another Console operator that displays the data after it passes through the Map Keys operator, helping you compare the before and after of your Data Workflow.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
After Map Keys
Connect the output port (right) of the
Map New KeyMap Keys operator to the input port (left) of theAfter Map KeysConsole operator.
Configure the Output Operator
In the last step of the Data Workflow, output your updated table to the Hidden component you created earlier.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
updatedTable
Action
value
Connect the output port (right) of the
Map New KeyMap Keys operator to the input port (left) of theupdatedTableOutput operator..png)
Click Save Component.
Configure the Button Component
Lastly, configure a Button component that you can click in Express View to trigger your Data Workflow.
Drag and drop a Button component onto your canvas, placing it below the
dwfMapKeysData Workflow component.In the Property ID field, enter
btnRunDWF.In the Label Text field, enter
Run Map Keys.From the Action Type drop-down, select Event.
From the On Click drop-down, enter or select
dwfMapKeys..png)
Click Save Component.
Save your module.
Here's how the completed example looks in the Module Builder:
.png)
Here's how the completed example works in Express View. Preview your module in Express View and open the DevTools Console. Click the Run Map Keys button and view the results in the console.


The Map Keys operator updates multiple key names in a table. For example, imagine you have a Data Table component using column headers named name1, name2, age, and income. You can rename keys like name1 and name2 to firstName and lastName using the Map Keys operator. It uses a mapping table that specifies which keys to replace and their new names. The operator automatically applies these updates across all objects in your array.
Tables store as an array of objects, with each object representing one row. Each column and its corresponding value in that row form a key/value pair.
Examples of when to use the Map Keys operator include:
Removing spaces from key names to prevent future errors.
Aligning key names from imported data with your current naming standards.
Renaming confusing or unclear keys when presenting data to end-users. For example, converting camel case to title case before exporting to CSV.
Simplifying long or complex key names from external API data to make them easier to reference in your workflows.
You’ll find the Map Keys operator under the Table group to the left of the Data Workflow canvas.
Similar Data Workflow Operators
The Map Keys, Map Values, and Create Field operators are closely related but serve different purposes.
Here are the comparisons:
Map Values operator: The Map Values operator lets you update the values in a set of key/value pairs. By comparison, the Map Keys operator lets you update the keys in a set of key/value pairs.
Create Field operator: Similar to the Map Values operator, the Create Field operator can update values in key/value pairs. However, the Create Field operator lets you use conditional logic with if statements and does not rely on a mapping table. Instead, you define the value changes directly in the operator’s Info window.
About the Info Window
Here's a breakdown of each setting in the Map Keys operator’s Info window:
Setting | Description |
|---|---|
Category | Grayed out and non-adjustable setting indicating the operation type. |
Label | Sets the label for your operator, displaying below the operator on your Data Workflow canvas. This field is optional, but set a label if you use more than one of the same operator type. A label helps you identify your operators without opening any Info windows. |
Source Column | Enter the name (column header) of the column in your mapping table that defines the original key names. |
Target Column | Enter the name (column header) of the column in your mapping table that defines the new key names. |
Adding a Map Keys Operator
In this example, use a Map Keys operator to update the keys in key/value pairs in an array of objects. Because the Map Keys operator lets you update table-based data, begin by configuring a Data Table component.
You can use the Map Keys operator with any table-based data, not just data from a Data Table component. For example, you can use the operator with data returned by the List Submissions for Dashboard API call. You can set up a Hidden component to store the data from the API call. Then, you'll use a simple Input-to-Output Data Workflow to move the data from Plug-In to Hidden component. The Hidden component is then used as the input in your Map Keys Data Workflow.
These instructions assume you have a new module open, saved, and with a title.
Configure the First Data Table Component
Configure a Data Table component that can be used as a data source. Create sample column headers that you can update later.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Label and Property Name fields, enter
dtData.In the data table, enter the following:
A
B
C
D
name1
name2
age
income
Minna
Amigon
34
77000
Mitsue
Tollner
46
102000
Abel
Maclead
31
65000
Sage
Wieser
49
121000

Click Save.
Configure the Second Data Table Component
Create a two-column table that acts as a mapping table. In the first column, oldKey, list all the keys you want the Map Keys operator to update. In the second column, newKey, list the new key names. Then, reference the mapping table's column headers in the Map Keys operator's Info window. Let's update the name1 key to be firstName and the name2 key to be lastName.
Drag and drop a Data Table component onto your canvas, placing it below the
dtDataData Table component.In the Label and Property Name fields, enter
dtMapping.In the data table, enter the following:
A
B
oldKey
newKey
name1
firstName
name2
lastName
You can list the keys you want to change in any order in the oldKey column. As long as the keys exist in the data source, the Map Keys operator will know to update them. You don't need to include quotation marks around your key names.

Click Save.
Configure the Hidden Component
Next, you'll configure a Hidden component to store your final table. You'll reference it later in your Data Workflow.
Drag and drop a Hidden component onto your canvas, placing it below the
dtDataanddtMappingData Table components.In the Property ID and Canvas Label Text fields, enter
updatedTable..png)
Click Save.
Configure the Data Workflow Component
Next, let's create the Data Workflow. With the help of your mapping table, the Map Keys operator in the Data Workflow will update the name1 and name2 keys.
Drag and drop a Data Workflow component onto your canvas, placing it below the
updatedTableHidden Component.In the Canvas Label Text and Property Name fields, enter
dwfMapKeys.
Configure the Input Operators
Drag and drop two Input operators onto your Data Workflow canvas.
Configure the first Input operator's Info window as follows:
Setting
Value
Category
Input
Component
dtData
Required
Yes
Source
Default
Configure the second Input operator's Info window as follows:
Setting
Value
Category
Input
Component
dtMapping
Required
Yes
Source
Default
Configure the Console Operators
Next, add a pair of Console operators so you can compare the before and after of the Data Workflow. One will display the data before using Map Keys, and the other will serve as a reminder of how you set up your mapping table.
Drag and drop two Console operators onto your Data Workflow canvas.
Configure the first Console operator's Info window as follows:
Setting
Value
Category
Console
Label
Mapping Table
Connect the output port (right) of the
dtMappingInput operator to the input port (left) of theMapping TableConsole operator.Configure the second Console operator's Info window as follows:
Setting
Value
Category
Console
Label
Before Map Keys
Connect the output port (right) of the
dtDataInput operator to the input port (left) of theBefore Map KeysConsole operator.
Configure the Map Keys Operator
Now you're ready to set up the Map Keys operator. Notice that the values you'll enter in the Info window's Source Column and Target Column fields match the column headers in the dtMapping Data Table component, which is your mapping table.
The Map Keys operator has two input ports. Always connect the data source to the upper input port and the mapping table to the lower input port.
Drag and drop a Map Keys operator onto your Data Workflow canvas.
Complete the operator's Info window as follows:
Setting
Value
Category
Map Keys
Label
Map New Key
Source Column
oldKey
Target Column
newKey
Connect the output port (right) of the
dtDataInput operator to the upper input port (left) of theMap New KeyMap Keys operator.Connect the output port (right) of the
dtMappingInput operator to the lower input port (left) of theMap New KeyMap Keys operator.
Configure the Third Console Operator
Next, let's add another Console operator that displays the data after it passes through the Map Keys operator, helping you compare the before and after of your Data Workflow.
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
After Map Keys
Connect the output port (right) of the
Map New KeyMap Keys operator to the input port (left) of theAfter Map KeysConsole operator.
Configure the Output Operator
In the last step of the Data Workflow, output your updated table to the Hidden component you created earlier.
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
updatedTable
Action
value
Connect the output port (right) of the
Map New KeyMap Keys operator to the input port (left) of theupdatedTableOutput operator..png)
Click Save.
Configure the Button Component
Lastly, configure a Button component that you can click in Express View to trigger your Data Workflow.
Drag and drop a Button component onto your canvas, placing it below the
dwfMapKeysData Workflow component.In the Property ID field, enter
btnRunDWF.In the Label Text field, enter
Run Map Keys.To the left of the component’s configuration window, click Actions.
Set the Action Type as Event.
In the On Click drop-down, select dwfMapKeys.
.png)
Click Save & Close.
Save your module.
Here's how the completed example looks in the Module Builder:
.png)
Here's how the completed example works in Express View. Preview your module in Express View and open the DevTools Console. Click the Run Map Keys button and view the results in the console.
