LEN

LEN returns the length of a string.

Function category: Text

LEN only operates on strings.

If you try to pass it another type of object, like an array, it might yield an unexpected result. For instance, when you try to run:

LEN({1, 2, 3}) you get 1 as a response.

Syntax

LEN(arg1)

Arguments

Description

arg1

A string.

Examples

Example 1: Find length of a string

Let's say we're given a response with the following vehicle information:

{
"data":{
"vehicles":{
"vehicle_1":{
"driver":"Otto H. Mobile"
}
}
}
}

If we want to find the string length of our driver name, we would use LEN:

LEN(data.vehicles.vehicle_1)

This returns the following:

14