MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 33


What DataWeave 2.0 type can be used as input to a mapObject operation?

Show Answer
Correct Answer: B

The mapObject operation in DataWeave 2.0 is specifically designed to iterate over an object. Therefore, the correct input type for mapObject is an Object. This operation applies a transformation function to each key-value pair in the Object, making it the appropriate type for this function.

Discussion

2 comments
Sign in to comment
dipehOption: B
Nov 9, 2023

dont confuse with map function map uses arrays mapObject uses obect

AquawormOption: B
Feb 21, 2022

Iterates over an object using a mapper that acts on keys, values, or indices of that object. https://docs.mulesoft.com/dataweave/2.4/dw-core-functions-mapobject