Returns the native JavaScript type of the given input. It’s useful for identifying whether a value is a number, string, array, object, or another type before applying logic in a flow.
-
Check types of different fields
{{typeOf record.age}} {{typeOf record.firstName}} {{typeOf record.items}}Input:
{ "record": { "age": 25, "firstName": "Alice", "items": [ { "sku": "ITEM001", "quantity": 2 }, { "sku": "ITEM002", "quantity": 1 } ] } }Output:
number string array
-
Check other common types and null
{{typeOf record.age}} {{typeOf record.flag}} {{typeOf record.firstName}} {{typeOf record.items}} {{typeOf record.note}}Input:
{ "record": { "age": 25, “flag”:true, "firstName": "Alice", "items": [ { "sku": "ITEM001", "quantity": 2 } ], "note": null } }Output:
number boolean string array object
Tip
-
The helper always returns lowercase type names (
string,number,array,object, etc.). -
For
null, the result isobjectbecause of JavaScript’s type system. -
Use this helper when building dynamic templates that depend on data type, such as formatting numbers differently from strings.