nameOf(t: Type): String Returns the name of the input type. Introduced in DataWeave version 2.3.0. Parameters Name Description t The type to query Example This example shows how nameOf behaves with different inputs. Source %dw 2.0 output application/json import * from dw::core::Types type AArray = Array<String> {n: 1} type AArray2 = Array<String> --- { a: nameOf(AArray), b: nameOf(AArray2), c: nameOf(String) } Output { "a": "AArray", "b": "AArray2", "c": "String" }
nameOf(t: Type): String Returns the name of the input type. Introduced in DataWeave version 2.3.0. Parameters Name Description t The type to query Example This example shows how nameOf behaves with different inputs. Source %dw 2.0 output application/json import * from dw::core::Types type AArray = Array<String> {n: 1} type AArray2 = Array<String> --- { a: nameOf(AArray), b: nameOf(AArray2), c: nameOf(String) } Output { "a": "AArray", "b": "AArray2", "c": "String" }