Maps Functions

Last update: 2023-01-26
  • Created for:
  • Experienced
    Developer

Use Map functions in personalization to make interaction with maps easier.

Get

The get function is used to retrieve the value of a map for a given key.

Syntax

{%= get(map, string) %}

Example

The following operation gets the value of the identity map for the key example@example.com.

{%= get(identityMap,"example@example.com") %}

Keys

The keys function is used to retrieve all the keys for a given map.

Syntax

{%= keys(map) %}

Example

The following operation gets all the keys for the map identityMap.

{%= keys(identityMap) %}

Values

The values function is used to retrieve all the values of a given map.

Syntax

{%= values(map) %}

Example

The following operation gets all the values for the map identityMap.

{%= values(identityMap) %}

On this page