Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- JSON Get
- JSON Set
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
String Length
AI-generatedSummary
Get the length of the string value stored at a specified Redis key.
Inputs
- Key (required) — The name of the Redis key whose string length you want to retrieve.
- Value Is JSON — Optional toggle shown only if the key type is 'hash'; specifies whether the value is JSON or key-value pairs. Not applicable for this operation.
Output shape
a single JSON object containing the key and the length of its string value
Outputs an object in the form { key: string, length: number }. If the key does not exist or is not a string, length will be 0 or Redis default behavior applies.
Examples
Example 1: Retrieve the length of a string stored under the key 'myStringKey'.
Set 'Key' to 'myStringKey', choose operation 'String Length'. The output will include the length of the string value at this key.