BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MuleSoft Exam MCD-Level-1 Topic 2 Question 83 Discussion

Actual exam question for MuleSoft's MCD-Level-1 exam
Question #: 83
Topic #: 2
[All MCD-Level-1 Questions]

What DataWeave expression transforms the array a to the XML output?

Show Suggested Answer Hide Answer
Suggested Answer: A

For such questions always look for Syntax:

I call it 'Wrap the Map'

trains:

{(

When mapping array elements (JSON or JAVA) to XML, wrap the map operations in {(..)}

-{ } are defining the object

-( ) are transforming each element in the array as a key/value pair


Contribute your Thoughts:

Claudio
5 months ago
I'm not sure which one to choose. Both A and B seem valid to me. What do you think, Benedict and Cecilia?
upvoted 0 times
...
Sylvia
5 months ago
I see your point, Sage. Option B does seem more concise in transforming the array.
upvoted 0 times
...
Sage
5 months ago
I disagree. I believe the answer is B because it directly maps the array to XML without unnecessary brackets.
upvoted 0 times
...
Cecilia
5 months ago
I agree with you, Benedict. Option A seems to be the most appropriate choice.
upvoted 0 times
...
Benedict
6 months ago
I think the answer is A because it correctly maps the array to XML output.
upvoted 0 times
...
Cordelia
6 months ago
Yes, I see now. Option B makes sense. Thanks for clarifying, team!
upvoted 0 times
...
Alona
6 months ago
Option B has the correct syntax for transforming the array to XML output, it matches the structure needed.
upvoted 0 times
...
Lakeesha
6 months ago
Option C seems plausible too, let's discuss the rationale behind our choices.
upvoted 0 times
...
Cordelia
6 months ago
I'm not sure, I think it might be option C instead.
upvoted 0 times
...
Alona
6 months ago
I agree with Lakeesha, option B looks like the right DataWeave expression.
upvoted 0 times
...
Lakeesha
6 months ago
I think the correct answer is option B.
upvoted 0 times
...

Save Cancel