Json

JSON.ARRINDEX

Search for the first occurrence of a JSON value in an array.

Arguments

keybodystrrequired

The key of the json entry.

pathbodystrrequired

The path of the array.

valuebodyTValuerequired

The value to search for.

startbodyintdefault: 0

The start index.

stopbodyintdefault: 0

The stop index.

Response

List[int]required

The index of the first occurrence of the value in the array, or -1 if not found.

Example
index = redis.json.arrindex("key", "$.path.to.array", "a")
Loading search…