> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# newMapForObjectWithIdentity()

- Package: [@gooddata/sdk-ui-dashboard](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-dashboard/src/_staging/metadata/objRefMap.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Creates [ObjRefMap](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.objrefmap/index.md) for any object of any type granted that it contains `ref` property with ObjRef.

The map will be setup so that it extracts id and uri from the `ref` - thus ensuring that objects that are both uri and identifier refs are indexed properly.

Storing objects whose `ref` is of both types then allows lookup of those objects externally using either id or uri.

**Signature:**

```typescript
export declare function newMapForObjectWithIdentity<T extends {
    identifier: Identifier;
    uri: string;
    ref: ObjRef;
}>(items: T[], type?: ObjectType, strictTypeCheck?: boolean): ObjRefMap<T>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| items | T[] | items to insert |
| type | [ObjectType](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objecttype/index.md) | _(Optional)_ type of objects, may be undefined |
| strictTypeCheck | boolean | _(Optional)_ whether to do strict type checking when getting by identifierRef |

**Returns:**

[ObjRefMap](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-dashboard/sdk-ui-dashboard.objrefmap/index.md)&lt;T&gt;
