cancel
Showing results for 
Search instead for 
Did you mean: 

How to split data in a nested array into multiple rows?

AvaniAnand
New Contributor

I'm trying to simply split an array of fields within an array into two discreet records 

Screenshot 2025-02-22 120319.png

 

 

 

for example in the above illustration, how do I split the array lineList into two records one for credit and one for debit based on the two elements in the array?

 

1 REPLY 1

JensDeveloper
Contributor II

Hi @AvaniAnand ,

Do you mean you want to split the nested array based on credit or for debit? Or you always wanne split for debit and credit? 

If you want them both I suggest using a copy and then two json splitters for splitting on Credit and Debit. You can add parent keys that you wanne keep. In the attachment is a demo pipeline that does this (first change the name to '.slp' extension and then import it into snaplogic) it does not allow me to upload those file extensions.

Let me know if this helps.

Regards

 

Jens