MCD-LEVEL-1 practice question 18 of 30
What is the correct syntax for a Logger component to output a message with the contents of a 3SON Object payload?
Full set: 235 questionsIn Mule 4, you can mix literal strings and DataWeave expressions in a component's property field (like a Logger's message field). The syntax The payload is: #[payload] correctly evaluates the DataWeave expression #[payload] and concatenates its string representation with the literal string "The payload is: ".
A: $(payload) is DataWeave string interpolation syntax, but it must be enclosed within a DataWeave expression block #[...] to be evaluated. B: Using the ++ operator to concatenate a String and an Object directly in DataWeave 2.0 throws a type mismatch error unless the Object is explicitly coerced to a String. D: The + operator is not used for string concatenation in DataWeave 2.0; ++ is the correct operator.
- MuleSoft Documentation, "DataWeave Language", Section: String Interpolation and Concatenation.
Keep practicing
Take the free MCD-LEVEL-1 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other MCD-LEVEL-1 practice questions
- Question 3A Mule flow has three Set Variable transformers. What global data structure can be used t…
- Question 7A web client submits a request to http://localhost:8081?accountType=personal. The query p…
- Question 8What statement is a part of MuleSoft's description of an application network?
- Question 9A Scatter-Gather processes three separate HTTP requests. Each request returns a Mule even…
- Question 12Which file is used to define the interface contract to invoke a web service implemented a…
- Question 13Correct answer is {customerID}. Reference: https://docs.mulesoft.com/http-connector/1.5/h…
