Upstash Documentation

LPOS

Returns the index of matching elements inside a list.
1 min read

Arguments#

keystrrequired#

The key of the list.

elementunknownrequired#

The element to match.

rankint#

Which match to return. 1 to return the first match, 2 to return the second match, and so on. 1 by default.

countint#

The maximum number of elements to match. If specified, an array of elements is returned instead of a single element.

maxlenint#

Limit the number of comparisons to perform.

Response#