Since you cannot know in advance how many instances of a block there is in a Message, you can create a
#foreach directive that loops over all instances of a block in the Message.
In this example, the #foreach directive loops over all instances of the block
blkA, and writes the value of the field
Description to the output.
You can also create a #foreach directive that loops over a fixed number of instances of a block in the Message.
In this example, the #foreach directive loops over the first four instances of the block
blkA, and writes the value of the field
Description to the output.
You can use a wildcard (*) to loop over all blocks in a Message, or over all sub-blocks in a block.
In this example, the #foreach directive loops over all instances of all blocks in the Message, and writes the value of the field
description in block
blkA and the value of the field
type in block
blkB to the output.