Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Sorted Set Cardinality

AI-generated

Summary

Retrieve the number of members in a specified sorted set in Redis.

Inputs

  • Sorted Set (required) — The name of the sorted set in Redis whose cardinality (number of members) you want to get.

Output shape

a list of items, each containing a JSON object with 'sortedSet' (the name of the sorted set) and 'cardinality' (the count of members)

Outputs one item per input with the cardinality of the sorted set. If an error occurs during execution, it may return an error object depending on node settings.

Examples

Example 1: Get the cardinality of a sorted set named 'mySortedSet'

Set 'Sorted Set' to 'mySortedSet' and choose operation 'Sorted Set Cardinality'. The output JSON includes {'sortedSet':'mySortedSet','cardinality':number_of_members}.

Discussion