Shorthand to find objects with a property value
Property to compare (Dot nation supported)
Value property must have
Function used by filter or find
filter
find
const found = [ {name: 'Batman'}, {name: 'Superman'},].filter(findByProp('name', 'Batman')); Copy
const found = [ {name: 'Batman'}, {name: 'Superman'},].filter(findByProp('name', 'Batman'));
Shorthand to find objects with a property value