09-25-2024 12:49 AM
Hello all,
i try to convert the following input/source into the described target structure with a mapper snap but i am not able to find a solution for this. Can anybody give me a hint or example how i can solve this problem
My current source:
[
{
"recordset": {
"item_id": "test_1",
"classification": {
"@class_id": "AB123",
"attributes": [
{
"@name": "key_1",
"$": "value_1"
},
{
"@name": "key_2",
"$": "value_2"
},
{
"@name": "key_3",
"$": "value_3"
}
]
}
}
},
{
"recordset": {
"item_id": "test_2",
"classification": {
"@class_id": "AB456",
"attributes": [
{
"@name": "key_4",
"$": "value_4"
},
{
"@name": "key_5",
"$": "value_5"
},
{
"@name": "key_6",
"$": "value_6"
},
{
"@name": "key_7",
"$": "value_7"
}
]
}
}
}
]
The target which i expect should look like the following:
[
{
"recordset": {
"item": "test_1",
"classification": {
"class_id": "AB123",
"attributes": {
"key_1": "value_1",
"key_2": "value_2",
"key_3": "value_3"
}
}
}
},
{
"recordset": {
"item": "test_2",
"classification": {
"class_id": "AB456",
"attributes": {
"key_4": "value_4",
"key_5": "value_5",
"key_6": "value_6",
"key_7": "value_7"
}
}
}
}
]
Many thanks in advance,
Dirk
Solved! Go to Solution.
09-25-2024 07:51 AM
Attached is a pipeline to do this mapping. It looks like this:
First Mapper:
Second Mapper:
Hope that helps!
09-25-2024 07:51 AM
09-26-2024 03:47 AM
Perfect,
you are a genius 👍
Your example do exactly what i needed.
Many thanks,
Dirk