Creating key/value pairs
In Talend Data Mapper, you
can create structure elements with a Map group type to work with
key/value pairs in your mappings.
About this task
{
"items": [
{
"id": "ABC123",
"name": "MBIKE",
"description": "27.5 inch electric mountain bike"
},
{
"id": "DEF456",
"name": "EBIKE",
"description": "Electric hybrid bike"
},
{
"id": "GHI789",
"name": "WBIKE",
"description": "Women's road bike"
}
]
}
Creating an output structure with key/value pairs
Create a structure containing an element with a Map group
type.
Procedure
Results

Mapping key/value pairs
Map elements from your input structure to create key/value pairs in your
output.
Before you begin
Procedure
- Create a new standard map and add your input and output structures.
- Drag and drop the input id element on the output key element to use the item IDs as keys.
- Drag and drop the input name and description elements on the corresponding output elements.
Results
{
"items": {
"ABC123": {
"name": "MBIKE",
"description": "27.5 inch electric mountain bike"
},
"DEF456": {
"name": "EBIKE",
"description": "Electric hybrid bike"
},
"GHI789": {
"name": "WBIKE",
"description": "Women's road bike"
}
}
}