%dw 2.0
output application/json
---
[ typeOf("A b"), typeOf([1,2]), typeOf(34), typeOf(true), typeOf({ a : 5 }) ]
DataWeave
typeOf
typeOf(T): Type<T>
Returns the type of a value.
Parameters
Name | Description |
---|---|
|
A string, object, array, number, or other supported type. |
Example
This example identifies the type of several input values.
Source
Output
[ "String", "Array", "Number", "Boolean", "Object" ]
JSON