ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 61 - MCD - Level 1 discussion

Report
Export

What is the correct syntax for a Logger component to output a message with the contents of a 3SON Object payload?

A.
The payload is: $(payload)
Answers
A.
The payload is: $(payload)
B.
#['The payload is: ' ++ payload]
Answers
B.
#['The payload is: ' ++ payload]
C.
The payload is: #[payload]
Answers
C.
The payload is: #[payload]
D.
#['The payload is: ' + payload]
Answers
D.
#['The payload is: ' + payload]
Suggested answer: B

Explanation:

Option 3 is the only corect answer as it concatenates payload with String.

Below option wont work.

#['The payload is ' ++ payload]

Concatenation function expects both arguments to be string. As the question says payload is json object , this will throw error while running it. You can try this in Anypoint Studio and you will get the same result which I mentioned.

hence correct answer is

The payload is: #[payload]

asked 18/09/2024
pradeep singh dhesi
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first