Option D gives below Error in Runtime.
""Trying to output second root, <trains>, while writing Xml at ." evaluating expression: "%dw 2.0
output application/xml
var conductorIds=[592,251]
---
trains:
conductorIds map ( (engId, index) ->
train: {
engineerId: engId
}
)
-------------------------------------------
So the Correct Answer would be Option B.
yes bro you are right..
even i also tried this expression :
var conductorIds=[592,251]
---
trains:
conductorIds map ( (engId, index) ->
train: {
engineerId: engId
}
) i am getting error..
so, i tried this ..
trains:
{(
conductorIds map ( (engId, index) ->
train: {
engineerId: engId
}
)
)} it is working fine ... correct option is "B"....
The correct answer is B: Tested on the anypoint studio
output application/xml
var conductorIds=[592,251]
---
trains: {
(conductorIds map ( (engId, index) ->
train: {
engineerId: engId
}
))
}
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
pgarciar
Highly Voted 3 years, 8 months agoZumo
Highly Voted 3 years, 6 months agoEmpire
2 years, 7 months agoExamDev
Most Recent 10 months, 1 week agoGaurav_9412
1 year, 4 months agomiguel_romero
2 years, 11 months ago