68.objectToMap

Write a function named objectToMap that receives an Object as a parameter.

This object can contain:

  • other objects
  • array of objects or primitives
  • basic primitive values

The function should convert this object, and all of it's nested ones to Maps, and return the result.

Example 1

Input

object

=

Output

Example 2

Input

object

=

Output