QuestionQ37

VerifiedTransform and format data with DataWeave

Refer to the exhibit.

Which DataWeave expression transforms the conductorIds array into the displayed XML output?

Question Image

Explanation

An XML root element is produced by the outer object key trains. Mapping conductorIds creates one train object per array element, each with an engineerId value. When writing XML, DataWeave represents a collection as repeated elements with the same key, producing repeated <train> elements inside <trains>.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!