toLowerCase
Description
Converts all alphabetical characters in a string to lowercase.
Syntax
Like many functions in DataPrime, toLowerCase supports two notations, function and method. These interchangeable forms allow flexibility in how you structure expressions.
- Function notation
- Method notation
toLowerCase(value: string): string
(value: string).toLowerCase(): string
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
value | string | true | The string to transform to lowercase |
Example
Normalize UUIDs for comparison
A direct comparison would fail due to differing cases. Use toLowerCase to normalize them:
Example data
{
"uuid1": "37367559-35f4-459c-943e-19025765da15",
"uuid2": "37367559-35F4-459C-943E-19025765DA15"
}
Example query
- Function notation
- Method notation
filter toLowerCase(uuid1) == toLowerCase(uuid2)
filter uuid1.toLowerCase() == uuid2.toLowerCase()
Example output
{
"uuid1": "37367559-35f4-459c-943e-19025765da15",
"uuid2": "37367559-35F4-459C-943E-19025765DA15"
}