Object
Findkey

_.findKey()

findKey(object, [predicate=_.identity])

This method is like _.find except that it returns the key of the first element predicate returns truthy for instead of the element itself.

Arguments

object (Object): The object to inspect.
[predicate=_.identity] (Function): The function invoked per iteration.

Returns

(*): Returns the key of the matched element, else undefined.

Example