What DataWeave expression transforms the example XML input to the CSV output?
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 MCPA-Level 1 exam Dumps Valid Version with 58 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments