MuleSoft
MCD-LEVEL-1 · Question #210
What DataWeave expression transforms the array a to the XML output? A. 1. 1. trains: 2. 2. {( 3. 3. a map ((engId, index) -> 4. 4. train: { 5. 5. TrainNumber: engId 6. 6. 7. 7. } 8. 8. ) 9. 9. )} B…
The correct answer is A. trains: (( a map ((engId, index) -> train: { TrainNumber: engId } ) )). You've hit your limit · resets 5:20am (America/New_York)
DataWeave
Question
What DataWeave expression transforms the array a to the XML output? A. 1. 1. trains: 2. 2. {( 3. 3. a map ((engId, index) -> 4. 4. train: { 5. 5. TrainNumber: engId 6. 6. 7. 7. } 8. 8. ) 9. 9. )} B. 1. 1. trains: 2. 2. a map ((engId, index) -> 3. 3. train: { 4. 4. TrainNumber: engId 5. 5. 6. 6. } 7. 7. ) C. 1. 1. {( 2. 2. trains: 3. 3. a map ((engId, index) -> 4. 4. train: { 5. 5. TrainNumber: engId 6. 6. 7. 7. } 8. 8. ) 9. )} D. 1. 1. { 2. 2. trains: 3. 3. a map ((engId, index) -> 4. 4. train: { 5. 5. TrainNumber: engId 6. 6. 7. 7. } 8. 8. ) 9. }
Exhibit
Options
- Atrains: (( a map ((engId, index) -> train: { TrainNumber: engId } ) ))
- Btrains: a map ((engId, index) -> train: { TrainNumber: engId } )
- C{( trains: a map ((engId, index) -> train: { TrainNumber: engId } ) )}
- D{ trains: a map ((engId, index) -> train:
How the community answered
(36 responses)- A61% (22)
- B14% (5)
- C19% (7)
- D6% (2)
Explanation
You've hit your limit · resets 5:20am (America/New_York)
Topics
#DataWeave#array transformation#XML output#map function
Community Discussion
No community discussion yet for this question.
