Forum Discussion
Hi @aaronb ,
I’m not sure how this is coming in or what downstream processing you’re doing, but could you utilize the $string.split() function if the input will always be this standard?
For example, if your text is the $content of a JSON response, you could use the mapper to go from
$content.split(‘ST810’) to $data
And then you would have an array in $data that you could iterate through/process together downstream.
Charles
Charles,
If it helps the content is coming in as just a text file which I am then parsing using a CSV delimiter snap with “*” as the delimiter in this case. The issue I run into is that in the file each ST to SE block of data needs to be kept together as it contains invoice header and invoice detail data. The only context of what invoice line detail goes with which header is that they both reside in the same ST to SE block. Hopefully that makes sense or helps clarify.
- aleung4 years agoContributor III
EDI data usually required a purpose build parser. You either likely need to write a custom python script to group it by ST/SE or some 3rd party solution to get it to a XML or JSON form before feeding it to snapLogic