Unit 1 · Make Intermediate: get() and map()

Get() function

12 min read Updated May 21, 2026

Unit introduction

Welcome to the first unit of the course “Using get() and map() functions”. This is the second course of the Make Intermediate learning path.

In the first unit, you will learn how to retrieve (get) values from an array and a collection using the get() function.

Make sure you feel comfortable with terms such as arrays and collections. We covered this in the course An introduction to data types and data structures.

Are you ready? Let’s start!

Element - MCQ

In this course, you are going to use functions, so let’s refresh your memory on that a bit.

Which of the following best describes the functions in Make?

In Make, functions are tools used to change data from one form to another, so it’s easier to read and process. They ensure that the data is in the correct format when you map it. For example, using the formatdate function you can change the date 2023-06-18T00:00:00.000Z (date value) to June 18, 2023 (text value).

Data types recap – arrays and collections

As you might remember from the course on data types and data structures, arrays and collections can get pretty complex. Sometimes you can deal with a collection of collections or an array of collections. In cases like this, it would mean that you have (multiple) structures nested inside your arrays or collections.

It also means that there is a lot of data and you might not necessarily need all of it.

You might wonder how to extract a specific item from a list or get a specific item based on its name. In this course, you will explore exactly that and learn how to extract items from an array using the get() function.

GET

Let’s explore the get() function to see what you can achieve with it.

The get() function extracts an item from a list. In this example, it is getting the 4th item in the array and outputting it into a collection. The result is a String / Collection.

The get() function

What does it do?

The get() function is used to extract a specific value from any object. It can be a single collection, an array of simple objects, or an array of collections.

The get() function in Make acts like a messenger that goes to another system, asks for specific information, and brings it back to you so that you can use it further in your scenarios. It’s like asking another system, “Hey, give me this particular piece of information!”

Think of it as going to a big shoe store and asking the shop assistant for a particular pair of purple boots you want to try!

An example

The get() function in Make is very similar to how you would map an item, but in some cases, you might not know in advance which fields you will receive.

Imagine a collection of shoes data. From time to time, some shoes might be vegan, and they’d have a field vegan_friendly=true. In that case, another field called material would also be provided. Since you don’t always have this field, it might not appear in the mapping panel. That’s when the get() function is very useful, because you can combine it with an If function.

Consider this data structure:

- clothes (array)
  - 1 (collection)
    - type: footwear
    - details (collection)
      - item_name: boots
      - item_size: 39
      - vegan_friendly: true
      - material: canvas
  - 2 (collection)
    - type: footwear
    - details (collection)
      - item_name: boots
      - item_size: 39
      - vegan_friendly: false

If the boots are vegan friendly, you will get the material they are made of. Note that in this example, you would have to iterate over the items in the clothes array first.

if(details.vegan_friendly=true;get(details;material))

This would result in = canvas.

Bear in mind that get() on its own is not that useful most of the time. It really shines when combined with other functions, as you will learn in the next units!

Where can I find it?

You’ll find the get() function in the mapping panel under General functions.

If you hover over it, you will see the explanation of the function and some examples on how to use it.

Notice on the screenshot that it has a specific structure.

Let’s go on to explore this in more detail!

the get() function structure

Let’s break down the structure of the get() function!

The get() function has the following structure: get(object or array; path)

Object or Array

First you need to define the object (collection) or array from which you want to extract the information.

Think of it as the source from which you want to fetch your data. In our boots example, the source was the boot. In real life this would be a shoe shop.

Remember that you can recognize a collection/array by hovering over the item to see its data type and by the dropdown arrow in front of it.

Path

Next, you need to define the value path.

This allows you to specify the exact location or path within the retrieved data where the value you want is located.

It’s like providing directions to Make on where to find the specific information you’re interested in within the retrieved data. It’s like telling the shop assistant what you’re looking for.

This allows you to extract specific information from complex data structures. You can compare this to finding that perfect pair of boots in a huge shopping center.

Dot notation

How do you access specific elements inside an array or collection? The answer is dot notation.

What is it?

To access nested objects, you have to use dot notation. Dot notation is the most common way to access elements in JavaScript, which is the programming language Make uses. To use dot notation, you simply write the name of the object followed by a dot and the name of the property you want to access. For example, food.pizza.

An example

For example, you have a store inventory (a collection of collections) and within that inventory you have a single item named boots. This item has properties like color, brand, and size.

To access the color property of the boots item using dot notation, you would write boots.color. This tells the program to retrieve or modify the value of the color property within the boots object. For instance, get(store;boots.color) = purple.

Raw names

In Make, to access your nested objects, you need to know the raw name if it is a collection, and the index if it is an array.

The raw name is the backend name of the item. It allows you to specify the name of an item or element in its original or unmodified format. This ensures that the item’s name is used exactly as it is, without any additional formatting or transformations applied by the module. For example, Raw: item_color.

To find the raw name of the item, hover over the item. You’ll see the pop-up text appear. Look for “Raw:” - what comes after the colon is the raw name of the item. You can then either copy-paste it or type that raw name in the field you need.

Important!

It’s really important to remember that raw names are case sensitive. This means that the spelling has to match exactly, otherwise it will return empty results. All parameters in the raw name are case sensitive. Even though if in the particular example the item’s label differs from its raw name only in capitalization, it is necessary to use the raw name exactly as it is written.

For example, if the raw name is item_color, typing item_Color would be incorrect.

The raw name does not always match the item name. For instance, the item name might be Contact ID but its raw name is just id.

Use case scenario – part 1

You covered the theory so now you are ready to start building your scenario. Work through every step before you continue.

To set the context for the scenario you’ll build, imagine you have an e-shop that sells clothes and and you want to gather data on your customer’s spending habits. You want to know how many items they buy, their details and what are the most expensive garments on their shopping list.

You are going to create a scenario which extracts the most expensive item from a shopping order, using the sort() and get() functions. For the sake of this exercise, we will provide you with the sample JSON data that you will use in your scenario. But note that the source data can come from any other apps Make supports or you can edit it manually.

Let’s start, shall we?

Click Create a new scenario. Name it Make Intermediate 2-1. Add JSON → Parse JSON module. Copy and paste the provided JSON into the JSON string field. The JSON contains the data of your order. Click OK to save your module mapping.

Now you’d probably want to see what data you have entered? Click Run this module only to see the output of the JSON module. You will notice that your JSON string outputs as a collection with the details of your shopping basket, the date of the order, order ID and total price. The Items list is an array, consisting of 6 collections. This means that your order consists of 6 items. Each item has its item name, price and color.

Now you have the list of items from the shopping order. The next step is to sort the items by price. This might help you understand what your customers buy and how much it costs. Add Tools → Set variable module. Under Variables, click Add item. Under Variable name, type Array sorted by price.

Under Variable value, you will add the function. This function will sort the values of your array according to the price in the descending order (meaning the most expensive items will be on top and the least expensive items on the bottom). To do this, you will use the sort() function. This function sorts the values of an array in the order you specify.

You can find the sort() function under the Functions for working with arrays. If you hover over it, you will see the explanation of how to use this function. Notice that it expects a specific kind of syntax.

sort(array; [order]; [key]) Sorts values of an array. The valid values of the order parameter are: asc (ascending order), desc (descending order), asc ci (case insensitive ascending order) and desc ci (case insensitive descending order). Use key argument to access properties inside complex objects. Use raw variable names for keys. To access nested properties, use dot notation. First item in an array is index 1.

Example: sort( Contacts[]; ; name ) = Sorts an array of contacts by the ‘name’ property. Example: sort( emails[]; ; sender.name ) = Sorts an array of emails by the ‘sender.name’ property.

Go on to the next part of this exercise to see how to map the sort() function.

Use case scenario – part 2

Let’s continue building your scenario. Go through every step before you continue.

In the Variable value field, add the sort() array function. You want to extract the item price in the descending order from the shopping_basket array.

Inside the function add the shopping_basket.items[] array. Then type ; "desc" to sort in descending order. Next add another semicolon ; and type the raw name "item_price" as the key to sort by. Finally, close down the function with an ending parenthesis ).

Click OK to save your module mapping.

Let’s take a moment to break the sort() function down:

  • in this instance shopping_basket:items[] is your array
  • desc is the order
  • item_price is the key to sort by

Note that you need to use the raw name for the key. The key is case sensitive, which means you have to type it (or better copy-paste) exactly as it is. To find out your key, hover over the item until you see the raw name. Ensure there are no spaces in your function.

Let’s see if the function works properly!

Click Run once and then check the output of the Tools → Set a variable module.

It should show the list of items but sorted in a way that the most expensive one is on top and the cheapest one on the bottom.

The next step is to extract the most expensive item from the shopping list. To do this you’ll use the get() function.

Add another Tools > Set variable module.

Under Variables, click Add item.

Under Variable name, type “Most expensive item”.

Under Variable value, enter the get() function. Inside the parentheses add the item Array sorted by price and type ; 1.item_name and close the function with an ending parenthesis ).

To break it down:

  • get() is the function/action you want to perform
  • Array sorted by price is your array (from the previous module) from which you want to extract items
  • 1 is the index, the position of the item inside the array/collection
  • item_name is the specific info you want to extract from your array

Note: This number specifies the index in your array. Here you want to get the item index 1 from the previous module (the most expensive item). If you wanted to get the 4th most expensive item, you’d need to type 4, instead of 1.

Click OK to save the module mapping.

Let’s try the scenario! Click Run once.

Check the output of the last module. It should return the most expensive item from the list. In this example this is Leather boots.

Great work! You have successfully built a scenario using 2 functions - sort() and get()!

Note that this scenario can be built on – you can send this data further to a messaging system, or a spreadsheet, whatever suits your need!