Returns true if the array contains the specified element.
 

1 array.contains

<array.contains name='name'>
    <value /> !
</array.contains>
Example

Determines if the array 'cities' contains the string value 'Barcelona'.

Copy
<xsql-script name='array_contains'>
    <body>
        <array name='cities'>
            <string>Barcelona</string>
            <string>Paris</string>
            <string>Roma</string>
        </array>
        <println>
            <!-- returns true -->
            <array.contains name='cities'>
                <string>Barcelona</string>
            </array.contains>
        </println>
    </body>
</xsql-script>

The result is:

Copy
true