1. Docs
  2. Formulas
  3. Functions

TYPE

Outputs the type (class) of the specified value as text: String (text), Integer (whole numbers), Float (decimal numbers), Array, Hash (objects), TrueClass (true), FalseClass (false), or NilClass (null).

Categories: Other

Syntax

TYPE(value)

Examples

Example 1

Input

1
{
2
"my_action": {
3
"message": "hello"
4
}
5
}

Formula

TYPE(my_action.message)

Output

"String"

Example 2

Input

1
{
2
"my_action": {
3
"message": 1
4
}
5
}

Formula

TYPE(my_action.message)

Output

"Integer"

Example 3

Formula

TYPE(3.14)

Output

"Float"

Example 4

Formula

TYPE([1, 2, 3])

Output

"Array"

Example 5: Objects return Hash

Formula

TYPE({"name": "John"})

Output

"Hash"

Example 6

Formula

TYPE(TRUE)

Output

"TrueClass"

Example 7

Formula

TYPE(NULL)

Output

"NilClass"

Sample actions

Event Transform
My Action
Event Transform
TYPE
Event Transform
My Action

Select an action to inspect

You can also click "Copy actions" and paste them in your Tines story to see how they work.

Was this helpful?