Forum Discussion

ForbinCSD's avatar
ForbinCSD
Contributor
7 years ago

Connection to legacy Sybase DBMS sometimes hangs

Hi All,

I am in requirement to transform JSON Array Object to a simple JSON Object with values in the array as below. I have thought and nothing striking to my mind. Hence any help will be appreciated. Please let me know if this is first doable in Snaplogic.

Input:
[
{
“BrandData”: [
{
“Source”: “SF”,
“SourceBrand”: “COKE”,
“Brand”: “01”
},
{
“Source”: “SAP”,
“SourceBrand”: “11”,
“Brand”: “26”
},
{
“Source”: “AS400”,
“SourceBrand”: “12”,
“Brand”: “12”
}
]
}
]

Output:
{
BrandData:
{
“SF-COKE”: “01”,
“SAP-11”: “26”,
“AS400-12”: “12”,
}
}

Please note the objects withing BrandData after transformation is based on the values of “Source”+“-”+“SourceBrand” and the value is “Brand”. Each array value will have one value in the transformed output.

Please let me know how to proceed on this.

Thanks and regards,
Sri