Runtime verified Test scripts included

Returns a list with the value of one field from each object in a list.

Syntax

{{map list fieldName}}

Returns array.

Parameters

Name Type Required Description
list array Yes List of objects to read.
fieldName string Yes Field to read from each object.

Example

Tested in Marketing Cloud Next emails on 2026-11-22 and 2026-11-25:

  • {{#if false}}{{map myList "name"}}{{/if}} is accepted when the email is saved. The branch never runs, so the helper itself is not rendered.
  • With a list of two rows built in AMPscript (%%[ SET @rows = BuildRowsetFromJSON('[{"name":"Bob","age":27},{"name":"Ann","age":21}]', '$[*]', 1) ]%%), {{#each (map rows "age")}}[{{this}}]{{/each}} renders [27][21].
  • {{map rows "name"}} on the same rows renders [Bob, Ann].
Show Next test script
<!-- Marketing Cloud Next test script for the map helper. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[gated] got=[{{#if false}}{{map probeList "name"}}{{/if}}gated]</p>
<p>c2 expect=[[27][21]] got=[%%[ SET @rows = BuildRowsetFromJSON('[{"name":"Bob","age":27},{"name":"Ann","age":21}]', '$[*]', 1) ]%%{{#each (map rows "age")}}[{{this}}]{{/each}}]</p>
<p>c3 expect=[[Bob, Ann]] got=[%%[ SET @rows = BuildRowsetFromJSON('[{"name":"Bob","age":27},{"name":"Ann","age":21}]', '$[*]', 1) ]%%{{map rows "name"}}]</p>

Marketing Cloud Next

Works as documented

Rendered as documented on a list of rows built in AMPscript. Tested 2026-11-25 by rendering in a Marketing Cloud Next email.

See also