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


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getCommentById(id); | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Gets all the comment properties for a given id.

Gets all the comment properties for a given id.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| commentId | Number | Yes | Id of the issue comment |

## Return Type

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

true

## Example

```
number&nbsp;[] arr = getAllCommentIds(key);
for(number x in arr) {
 JComment cmt = getCommentById(x);
 runnerLog("Got comment:" + cmt["text"]);
}
```

## See also

> Macro (contentbylabel)