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

> Macro (button-handy)



> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getComponentsObjects(projectKey) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## 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.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | projectKey | String | Yes | Project key. |

## Return Type

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

## 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)