---
title: FIRST
url: https://www.tines.com/docs/formulas/functions/first/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# FIRST

*[View on tines.com](https://www.tines.com/docs/formulas/functions/first/)*

Returns the first element of an array.

**Categories:** Arrays

## Syntax

```
FIRST(array)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": [
      "north",
      "south",
      "east",
      "west"
    ]
  }
}
```

Formula:

```
FIRST(my_action.message)
```

Output:

```json
"north"
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "1",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "flat_array": [
            "apple",
            "pear",
            "orange",
            "grapes"
          ],
          "object_array": [
            {
              "name": "Martin"
            },
            {
              "name": "Shelby"
            },
            {
              "name": "Thomas"
            }
          ]
        }
      },
      "position": {
        "x": -6540,
        "y": -1350
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "FIRST SECOND ETC",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "first": "=FIRST(my_action.object_array)",
          "second": "<<my_action.flat_array[1]>>"
        }
      },
      "position": {
        "x": -6540,
        "y": -1260
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
