Refer to the exhibits.
The Set Payload transformer's value is set to {`˜year': `˜2020'}.
What message value should be added to the Logger component to output the message `˜The year is `˜2020', without hardcoding 2020?
Refer to the exhibits.
The Set Payload transformer's value is set to {`˜year': `˜2020'}.
What message value should be added to the Logger component to output the message `˜The year is `˜2020', without hardcoding 2020?
To output the message 'The year is 2020' without hardcoding the year value, the correct syntax in the MuleSoft Logger component should utilize DataWeave expression language. The expression that concatenates a string with a payload field is written using '#[]', with the variable expression inside the brackets. The correct format for achieving this is '#["The year is " + payload.year]'. This will dynamically fetch the 'year' value from the payload and concatenate it into the string, resulting in the desired output.
"The year is #[payload.year]"
A is correct
"The year is #[payload.year]"
Funny enough, I tried it and it seems both A and B seems to work. A is not the most natural thing though -- as you typically click on the FX button and that put the brackets around the whole expression.
No, I'm wrong -- B only works with quotes around: message='#["The year is $(payload.year)"]' but that's not in the option. Sorry for confusion...
Refer to the exhibits. The Set Payload transformer's value is set to {`˜year': `˜2020'}. What message value should be added to the Logger component to output the message `˜The year is `˜2020', without hardcoding 2020? A. "The year is #[payload.year]" B. "#[The year is $(payload.year)]" C. "#["The year is ++ payload.year"]" D. "#["The year is " + payload.year]"