findBy (key, value) Objectpublic
Returns the first item with a property matching the passed value. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to true.
This method works much like the more generic find() method.
Parameters:
-
key
String - the property to test
-
value
[String] - optional value to test against.
Returns:
-
Object - found item or `undefined`
Please login to continue.