Skip to main content

$$length

Returns the length of a value

Usage​

"$$length([type],[default_zero]):{input}"

Returns​

integer

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
Primarystring/array/objectYesValue to check length of
typeEnumAUTO/STRING/ARRAY/OBJECTAUTORestrict the type of value to check length of (if specified type not detected the result will be null)
default_zerobooleantrue/falsefalseWhether to return 0 instead of null (on any kind of issue)

Examples​

Input

Definition

Output

"hello world"
"$$length:$"
11
"hello world"
"$$length(STRING):$"
11
["a","b","c"]
"$$length:$"
3
{
"a": 1,
"b": 2,
"c": 3,
"d": 4
}
"$$length:$"
4
{
"a": 1,
"b": 2,
"c": 3,
"d": 4
}
"$$length(STRING):$"
null
[1,2,3]
"$$length(STRING,true):$"
0