deepak_shaw
4 years agoContributor
Key value pair from object array
Hi,
I would like to create the below outbound message from an incoming object array.
{
"root": {
"elementName": {
"@attributeName": "attributeValue",
"$": "elementValue"
},
"repeatedElement": [
{
"key": {
"@attr": "attr1",
"$": "key1"
},
"value": "value1"
},
{
"key": {
"@attr": "attr2",
"$": "key2"
},
"value": "value2"
}
]
}
}
Any suggestion please on the repeated elements, attributes, and values?
Thanks,
Deepak Shaw
Done, check the pipeline and let me know if this works for you. Can be made with multiple mappers or a JSON Schema as well, but this is simpler in terms of snaps usage.