Was this page helpful?

List.IndexOf

    Table of contents
    1. 1. Usage Restrictions
    2. 2. Parameters
    3. 3. Result
    4. 4. Samples
    list.IndexOf(list : list, value : any) : num
    

    Find the index position of the given value.

    Usage Restrictions

    1.9.1 or later

    Parameters

    Name Type Description
    list
    list The list value.
    value
    any value to check for.

     

    Result

    The index number that indicates where the value exists in the list. (Index begins at 0.)  Returns -1 if the value is not found.

    Samples


    Output

    to find out where a value exists list:

    {{ list.indexof([1,2,"cat", true], "cat") }} 

     

    2
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by