typeOf

typeOf(T): Type<T>

値の型を返します。

パラメーター

名前 説明

value

string (文字列)、object (オブジェクト)、array (配列)、number (数値) などのサポートされている型。

次の例では、いくつかの入力値の型を識別します。

ソース

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

出力

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