---
title: getObjects
slug: viewer-3d/methods/getObjects
docTags: 
createdAt: 2024-03-01T14:17:48.683Z
---

Returns information about the specified objects.

## Example

::codepen{url="https://codepen.io/Catenda/embed/ZEdyvrY"}

## Usage

```javascript
const objectIds = ["object-1, object-2"];

const objectInfos = viewer3d.getObjects(objectIds);
```

## Parameters

### objectIds

List of object ids to limit result, returns all objects by default.

| **Type**       | **Required** |
| -------------- | ------------ |
| Array\[String] | No           |

## Return Value

List of object information.

:::hint{type="info"}
If any of the ids in the list are invalid, the corresponding entry in the returned list will be null.
:::

| **Type**               |
| ---------------------- |
| Array\[Object or Null] |

**Properties**

| **Name**        | **Type** | **Description**                            |
| --------------- | -------- | ------------------------------------------ |
| `id`            | String   | Id of the object                           |
| `modelId`       | String   | Id of the model                            |
| `triangleCount` | Number   | Number of triangles in the object geometry |

### Example

```javascript
[
  {
    id: "192042324556",
    modelId: "my-model-id",
    triangleCount: 60
  }
];
```

