These docs are for v1.0. Click to read the latest docs for v1.2.

MAP

Transforms each value of the specified array into a new value using a formula.

Syntax

=MAP(array, expression)

Arguments

ArgumentTypeDescription
arrayArrayArray of elements
expressionLambdaTransformation to perform on each item of the array

Examples

=MAP(ARRAY(1, 2, 3), x => x * x)[1, 4, 9]
MAP function is called for each item in the array (the values 1, 2, and 3). For each item, the value is multiplied by itself, resulting in an array containing the square of each value: [1, 4, 9].