> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/object/objectkey.md).

# objectKey()

Returns the first key in an object that has a matching value.

```javascript
const roles = { admin: 1, editor: 2 };

objectKey(roles, 2); // editor
```
