#indexOf
Returns the zero-based index of the first occurrence of the provided value.
#indexOf(value, search)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
value |
path | string | array |
The string or array to search. |
search |
any |
The value to find. |
Returns
Section titled “Returns”integer
Examples
Section titled “Examples”Find a character
Section titled “Find a character”{ "text": "hello"}{ "result": "#indexOf($.text, 'l')"}{ "result": 2}