---
title: MAP
url: https://www.tines.com/docs/formulas/functions/map/
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)*

# MAP

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

Creates an array by extracting the values for a given key or path from an array of objects. Path is a dot-separated string of keys. If a property name has spaces, wrap it in square brackets and double quotes.

**Categories:** Arrays

## Syntax

```
MAP(array_of_objects, path)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "animals": [
      {
        "color": "Brown",
        "type": "Dog"
      },
      {
        "color": "Beige",
        "type": "Cat"
      }
    ]
  }
}
```

Formula:

```
MAP(my_action.animals, "type")
```

Output:

```json
[
  "Dog",
  "Cat"
]
```

### Example 2

Input:

```json
{
  "my_action": [
    {
      "a": {
        "b": {
          "c": "d"
        }
      }
    }
  ]
}
```

Formula:

```
MAP(my_action, "a.b.c")
```

Output:

```json
"d"
```

### Example 3

Input:

```json
{
  "fetch_data": {
    "users": [
      {
        "User ID": "ID1"
      },
      {
        "User ID": "ID2"
      }
    ]
  }
}
```

Formula:

```
MAP(fetch_data.users, '["User ID"]')
```

Output:

```json
[
  "ID1",
  "ID2"
]
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "1",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "animals": [
            {
              "type": "Dog",
              "color": "Brown"
            },
            {
              "type": "Cat",
              "color": "Beige"
            }
          ]
        }
      },
      "position": {
        "x": -195,
        "y": 2505
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "MAP",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "map": "=MAP(my_action.animals,\"type\")"
        }
      },
      "position": {
        "x": -195,
        "y": 2595
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
