The _.mapObject() function is similar to the map but used for the object. This function transforms each value of the object based on the given function/operation.
_.mapObject(object, iteratee, [context])
Parameters: This function accepts three parameters as mentioned above and described below:
- object: It contains the object element that holds the elements of key and value pair.
- iteratee: It is the function which is used to take all the elements of the list and it also remember all the returned value.
- context: This parameter is used to display the content.
Return Value: It returns the transform value of each object element.