Find the first occurrence of the object passed as an argument, checking the equality of objects using the method 'equals'.

1 array.indexOf

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

Find the first position where the object is located.

Copy
<xsql-script name='array_indexOf'>
    <body>
        <array name='cities'>
            <string>Barcelona</string>
            <string>Paris</string>
            <string>Roma</string>
        </array>

        <!-- indexOf element: 1 -->
        <println>indexOf element: <array.indexOf name='cities'><string>Paris</string></array.indexOf></println>

    </body>
</xsql-script>

The result is:

Copy
indexOf element: 1