ForEach command

The ForEach loop command is for going through on the elements and items of an array which you can specify with the Array ID of it. It is widely used as a Voicemail functionality when you would like to listen to all of your new or old messages and for example you would like to reach who was the sender of the message and when did it arrived.

Parameters

Parameter name Example value Description Mandatory
Source sampleArray This is the ID of an array which you want to iterate in it. yes

OzML example

The following OzML example iterates through the 'sampleArray' array, and read out all of its items with the Speak command.

<?xml version="1.0"?>
<Response>
    <ForEach source='sampleArray'>
        <Speak>$item</Speak>
    </ForEach>
</Response>

More information