map
  • 23 May 2023
  • Dark
    Light
  • PDF

map

  • Dark
    Light
  • PDF

Article summary

map Task Purpose

The map task is used to map an input to an array of values.

Potential Use Case

Suppose you have a list of data to input and you want to give each item in the list a numerical placement value. You could use the map task to accomplish this.

Properties

Input and output parameters are shown below.

Incoming Type Description
arr Array Required. The input array (objects or values) to be mapped.
map Array Required. An array of values that will be used as the map.


Outgoing Type Description
result Object The mapped result.

Example

In this example the arr variable is ["a","b","c"] and the values to map are the numerals [1,2,3,].

map-01

The result that returns is a list of key-value items shown as ["a": 1, "b":2, "c":3].

map-02


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.