Converts Map to Array with a provided transformer function. Useful for plucking out certain properties
from contained values and for creating a new map based on transformed values from an input map.
Example: Get an array of ages from a map of Person objects
Converts Map to Array with a provided
transformer
function. Useful for plucking out certain properties from contained values and for creating a new map based on transformed values from an input map.Example: Get an array of ages from a map of Person objects
In the above example, the
transformer
function returns a number, but it could just as well return a transformed version of the input: