MAP_LAMBDA

Return an array that is the result of calling lambda with each element of the input array.

Syntax 

MAP_LAMBDA(array, lambda)

Examples 

Example 1

Construct an array of objects from input array.

Input

{
  "my_action": {
    "email_array": [
      "foo@tines.com",
      "bar@tines.com"
    ]
  }
}

Formula

MAP_LAMBDA(email_array, LAMBDA(elem, OBJECT("email_address", OBJECT("address", elem))))

Output

[
  {
    "email_address": {
      "address": "foo@tines.io"
    }
  },
  {
    "email_address": {
      "address": "bar@tines.io"
    }
  }
]
Was this helpful?