Split Single File to Multiple File using For Each

This example take json file from source folder, split it based on json array’s elements to multiple payload, renamed then saved to multiple files in target folder. See below gif animation: Input file:Orders.txt

Output file: 2501.txt

Output file:

DataWeave – Transform Nested Structure to Flat using map and flatten

Nested Json to Flat Json This example show usage of DataWeave to transform nested json structure to flat json structure. i break them into step 1 and 2 to better illustrate the transformation. Input Json:

After Step 1: