INDEX_OF

Returns the index of the specified term within the provided string or array.

Syntax 

INDEX_OF(string_or_array, term)

Examples 

Example 1
0

Input

{
  "my_action": {
    "data": [
      "foo",
      "bar"
    ]
  }
}

Formula

INDEX_OF(my_action.data, "foo")
Example 2

Input

{
  "my_action": {
    "string": "foobar"
  }
}

Formula

INDEX_OF(my_action.string, "bar")

Output

3
Example 3

Input

{
  "my_action": {
    "data": [
      "foo",
      "bar"
    ]
  }
}

Formula

INDEX_OF(my_action.data, "cat")

Output

"NULL"
Was this helpful?