Upstash Documentation

LPOS

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

Arguments#

keystringrequired#

The key of the list.

elementunknownrequired#

The element to match.

opts#
ranknumber#

The rank of the element to match. If specified, the element at the given rank is matched instead of the first element.

countnumber#

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

maxLennumber#

Limit the number of comparisons to perform.

Response#