---
lang: en
title: 'API docs: repository.entity.getidof'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.entity.getidof.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [Entity](./repository.entity.md) &gt; [getIdOf](./repository.entity.getidof.md)

## Entity.getIdOf() method

Get the identity value for a given entity instance or entity data object.

<b>Signature:</b>

```typescript
static getIdOf(entityOrData: AnyObject): any;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  entityOrData | <code>AnyObject</code> | The data object for which to determine the identity value. |

<b>Returns:</b>

`any`


