Contact Free trial Login

typeOf

typeOf(T): Type<T>

Returns the type of a value.

Parameters

Name Description

value

A string, object, array, number, or other supported type.

Example

This example identifies the type of several input values.

Source

%dw 2.0
output application/json
---
[ typeOf("A b"), typeOf([1,2]), typeOf(34), typeOf(true), typeOf({ a : 5 }) ]

Output

[ "String", "Array", "Number", "Boolean", "Object" ]

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.