What DataWeave expression transforms the example XML input to the CSV output?
A)
B)
C)
D)
A . Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation:
Correct answer is as below. Attributes in the incoming xml payload are always accessed using @.Similarly *item is required as we have multiple items in the request %dw 2.0
output application/csv
—
payload.sale.*item map ((value, index) -> {
index: index,
sale: value.@saleId,
itemName: value.desc,
itemPrice: (value.quantity) * (value.price),
item: value.@itemId
} )
Latest MCD-Level 1 Dumps Valid Version with 99 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund