---
title: "insight_getObject"
canonical: "https://support.appfire.com/space/PSJ/15481121/insight_getObject"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | insight_getObject(id) or insight_getObject(objectTypeId, key) | **Package** | insight |
| **Alias** |  | **Pkg Usage** | getObject(id) or getObject(objectTypeId, key) |

## Description

> Macro (excerpt)
> 
> Returns the type of the attribute, either by id or by objectTypeId and key.

Returns the type of the attribute, either by id or by objectTypeId and key.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| id | Integer | Yes | The id of the object attribute. |

### Or

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| objectTypeId | Integer | Yes | The id of the type of object being queried. |
| key | String | Yes | The key of the attribute. |

## Return Type

**[IObject](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/15488625)**

## Examples

### Example 1 - getting object attribute type by id

```javascript
use "insight";
IObject myObject;
myObject = getObject(12345);
runnerLog(myObject.id);
runnerLog(myObject.lablel);
```

Result:

### Example 2 - getting object attribute type by object type id and key

```javascript
use "insight";
IObject myObject;
myObject = getObject(12345);
runnerLog(myObject.id);
runnerLog(myObject.lablel);
```

Result:

## See also

> Macro (contentbylabel)