Forum Discussion
Thanks Aleksandar. Is there a resource to learn this notation and how to use it in Snaplogic?
If my JSON were formatted like this, how would I adapt that expression?
{
"id": "1",
"subjects":
[
{
"subject_id":"a"
},
{
"subject_id":"b"
}
]
}
Aleksandar_A
3 years agoContributor III
For more resources and helpful insights please refer to the official SnapLogic documentation SnapLogic Documentation.
In order to format the new json you can use the following expression in a Mapper Snap:
$subjects.map(x => x.extend({"id":$id}))
Then use a JSON Splitter to split the subjects array.
You can also refer to the sample pipeline attached below:
–sl-comm-array-denormalized-table_2023_06_23.slp (9.0 KB)
Regards,
Aleksandar.