Forum Discussion
Aleksandar_A
3 years agoContributor III
Hello @maahutch,
You can try by using the following expression in a Mapper Snap:
$.mapValues((v,k) =>v.mapValues((v1,k1) => typeof v1 == 'object' ? v1.subject_id.map(x => {"id":v.id,"subject_id":x}): false))
Then, you just split the array with JSON Splitter with the following JSON Path:
jsonPath($,"..subject")
Attached below is the sample pipeline.
–sl-comm-array-denormalized-table_2023_06_22.slp (5.1 KB)
Please note that if you have another input structure this will not work.
Let me know if this helps you.
Best Regards,
Aleksandar.