---
schema_version: "1"
id: dde16acf0471f9255bb57b7c1a6ca1777ffe10704efb449d28d56b0e20d7d1c1
title: "Handlebars Helper Function: get"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/handlebars/reference/objects/mcn-handlebars-reference-objects-get.md
canonical_url: https://developer.salesforce.com/docs/marketing/handlebars-for-marketing-cloud-next/references/mcn-handlebars-objects-references/mcn-handlebars-reference-objects-get.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 800a7d4ed2c77dd0ad9c1c171baaeb7632338eefcd7fb5dd3281631d1f1eecf5
products:
  - Handlebars for Marketing Cloud Next
  - Marketing Cloud
---
# Handlebars Helper Function: get

Retrieves a value from a list or map by index or key.

## Availability

This helper is available in the Winter ’26 release of Marketing Cloud Next.

## Syntax

```handlebars
{{get collection indexOrKey}}
```

## Parameters

| Parameter    | Type              | Description                                                                    |
| ------------ | ----------------- | ------------------------------------------------------------------------------ |
| `collection` | List or Map       | Required. The list or map to retrieve from.                                    |
| `indexOrKey` | Integer or String | Required. The index to retrieve from a list or the key to retrieve from a map. |

## Return Value

The function returns the value at the specified index or key. If the index or key isn’t found, or if the collection type is invalid, the function throws an exception.

## Usage Examples

These examples show how to use the `get` function to retrieve a value by index or key from a list or map.

### Get Value by Index

This example shows how to use the `get` function to get the value at the specified index. Note that the first element is at index 0.

```javascript
myList = ["apple","banana","cherry"];

{{get myList 1}}
```

The function returns `banana`.

### Get Value by Key

You can also use the `get` function to retrieve a value by key from a map.

```javascript
myMap = {"apple": "red", "banana": "yellow", "orange": "orange"};

{{get myMap "banana"}}
```

The function returns `yellow`.

### Get Nested Value

The `get` function is also helpful for retrieving nested values from lists or maps.

```javascript
myList = [{"apple": "red"}, {"banana": "yellow"}, {"orange": "orange"}];

{{get (get myList 1) "banana"}}
```

The function returns `yellow`.
