---
title: "getComponentsObjects"
canonical: "https://support.appfire.com/space/PSJC/434831843/getComponentsObjects"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Returns all the project components as an array of JComponent structures.

Returns all the project components as an array of JComponent structures.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getComponentsObjects(projectKey) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| projectKey | String | Yes | Project key. |

## Return Type

**[JComponent []](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/435028065)**

## Example

```javascript
JComponent [] compObjs = getComponentsObjects("TP"); //projectKey as parameter
for(JComponent comp in comObjs) {
    runnerLog(comp.name);
    runnerLog(comp.lead);
}
```

Returns an array of JComponent structures containing all the project components.

## See also

> Macro (contentbylabel)