T

T returns a string as text.

Function category: Text

T will return an error if it is not passed a string as an argument.

Syntax

T(arg1)

Argument

Description

arg1

String or reference to a string.

Examples

Example 1: Return text value of string or object reference

T is not commonly used as an explicit function (as it does not perform coercion). It simply returns the text value of a string or object reference:

{
"data":{
"driver_name": "error, could not retrieve driver name"
}
}

If we wanted the value of "driver_name" as a text string, we can use T:

T(data.driver_name)

This returns the following:

"error, could not retrieve driver name"