Transforming JSON Data

Hello All,

Trying to transform the JSON data into a mapper. Can anyone help me to get this resolved without using the script snap? Attached the pipeline with JSON generator and expected output.

JSON Mapper_2020_02_12.slp (10.3 KB)

Thanks!

Try taking a look at the sl.zipObject() function:

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439396/SL+Functions+and+Properties#SLFunctionsandProperties-sl.zipObject

Using your $Columns as keys and your $data as the values from your example pipeline like this:
sl.zipObject($Columns, $data) should give you close to what your looking for.

1 Like