MAP function

When you're building pages, you'll constantly work with arrays of objects, like lists of users, incidents, alerts, or any structured data. Most of the time, you don't need everything in those objects. You just need specific pieces: the names, the IDs, the email addresses, the statuses.

The MAP function extracts exactly what you need from an array of objects, creating a new, simplified array with just those values. It takes two things: an array of objects and a path to the data you want. It walks through each object in the array, pulls out the value at that path, and returns a new array containing only those values.

Basic syntax 

MAP(array_of_objects, "path")

The path is the location that tells MAP where to find the data inside each object. If you're extracting a top-level field, it's just the field name. If you're reaching into nested data, you use dots within the reference path to navigate deeper.

💡Note

MAP example: Get incident IDs 

Let's say you have an HTTP Request action called "Get incidents" that returns a list of active incidents:

{
  "data": [
    {
      "incident_id": "INC-001",
      "priority": "high",
      "assigned_to": "Alice"
    },
    {
      "incident_id": "INC-002",
      "priority": "critical",
      "assigned_to": "Bob"
    },
    {
      "incident_id": "INC-003",
      "priority": "medium",
      "assigned_to": "Charlie"
    }
  ]
}

You want just the incident IDs for a drop-down list in a page. Here's how you'd use MAP in a pill to do that:

MAP(get_incidents.data, "incident_id")

The output:

["INC-001", "INC-002", "INC-003"]

MAP walked through each object, grabbed each iteration of the incident_id field, and returned an array of those values. No priorities, no assignees, just the IDs.

🖐️ Try this: Configure a MAP formula 

Was this lesson helpful?

Built by you,
powered by Tines

Already have an account? Log in.