Skip to Content

filterBy()

Returns all objects in an array that match the given properties.

Kind: global function
Returns: Array.<Object> - Array of matching objects (empty array if none match).

ParamTypeDefaultDescription
objectsArray.<Object>The array to filter.
[filterProperties]ObjectKey-value pairs to match against.

Example

const homeAddresses = ARM.filterBy(addresses, { attributes: { kind: 'home' } })
Last updated on