Skip to Content

mapBy()

Extracts a single property from every object in an array.

Kind: global function
Returns: Array.<*> - A new array of the extracted values.

ParamTypeDescription
objectsArray.<Object>The array to map over.
mapByPropertystringDot-notation path to the property to extract.

Example

const ids = ARM.mapBy(addresses, 'id') const cities = ARM.mapBy(addresses, 'attributes.city')
Last updated on