Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
var myVar = read('<xml attr="x"><a>true</a><b>1</b></xml>', 'application/xml')
output application/json
---
{ "entriesOf" : entriesOf(myVar) }
entriesOf
entriesOf
You're viewing an older version of the documentation. You can switch to the latest version or use the version selector in the left navigation.
Returns an array of key-value pairs that describe the key, value, and any attributes in the input object.
Introduced in DataWeave version 2.3.0.
This example returns the key, value, and attributes from the object specified
in the variable myVar. The object is the XML input to the read function.