mapBy()
Extracts a single property from every object in an array.
Kind: global function
Returns: Array.<*> - A new array of the extracted values.
| Param | Type | Description |
|---|---|---|
| objects | Array.<Object> | The array to map over. |
| mapByProperty | string | Dot-notation path to the property to extract. |
Example
const ids = ARM.mapBy(addresses, 'id')
const cities = ARM.mapBy(addresses, 'attributes.city')Last updated on