Multipart Write Snap Using the JSON Format Data

In the following pipeline, the Multipart Writer Snap reads the data in a JSON format and displays the result as a multipart output stream.



The JSON Generator Snap passes the data to the Multipart Writer Snap.



In the Multipart Writer Snap, the Group Identifier allows us to create seperate documents with a specific value (here $num) as per the requirement.

If the Group Identifier is $['content-type'], then the output document would have all the files under a single Group Identifier.

Successful execution of the pipeline displays the output shown below:

The output has two previews with two different Group Identifiers: one for the $num value 1 and one for $num value 2.