---
title: General functions
slug: general-functions
description: Manage how specific items are extracted or omitted from your data and apply conditional logic
image: https://archbee-image-uploads.s3.amazonaws.com/oAyFj2GHlBeBVWF5OAir2/iDpYabsbW41vbw4sDHISY_domino-zoomin-purple-a-1.png
docTags: 
createdAt: 2025-02-03T13:29:15.598Z
---

General functions let you fine-tune your mapping in a scenario. For example, you can select or leave out items in an array or apply conditional criteria to your mapping.&#x20;

## Functions

The following functions are available in the General functions tab in Make.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/C94uXHQSVNurmSyJZEGi--20260323-084043.png" size="50" width="342" height="279" position="flex-start" alt="General functions - available functions" darkWidth="342" darkHeight="279" showCaption="false"}

### equal

**equal(value; value)**

Compares values to see if they are equal.

### set

set (object; path; value)

Sets or adds a value at a specific location in an array or object, leaving the rest of the structure unchanged.

```javascript
set(user;name;John)
set(user;address.city;Prague)
```

### get&#x20;

**get (object or array; path)**

Returns the value path of an object or array. To access nested objects, use dot notation. The first item in an array is index 1.

```javascript
get(array;1+1)
```

```text
get(array;5.raw_name)
```

```text
get(object;raw_name)
```

```text
get(object;raw_name.sub_raw_name)
```

### if&#x20;

**if** **(expression; value1; value2)**

Returns value 1 if the expression is evaluated to be true. Otherwise, it returns value 2.

```text
if(1=1;A;B)
= A
```

```text
if(1=2;A;B)
= B
```

### ifempty

**ifempty (value1; value2)**

Returns value 1 if this value is not empty. Otherwise, it returns value 2.

```text
ifempty(A;B)
= A
```

```text
ifempty(unknown;B)
= B
```

```text
ifempty("";B)
= B
```

### switch

**switch** **(expression; value1; result1; \[value2; result2; ...]; \[else])**

Evaluates one value (called the expression) against a list of values, and returns the result corresponding to the first matching value.

```text
switch(B;A;1;B;2;C;3)
= 2
```

```text
switch(C;A;1;B;2;C;3)
= 3
```

```text
switch(X;A;1;B;2;C;3;4)
= 4
```

### omit&#x20;

**omit (collection; key1; \[key2; ...])**

Removes elements with the given keys from a collection. Returns a collection with the remaining elements. Useful when you want to pass a collection to an API, which expects an exact number of elements in the collection. Using this function, you can make sure your collection meets the requirements of the API.

### pick&#x20;

**pick (collection; key1; \[key2; ...])**

Picks elements with the given keys from a collection. Returns a collection that contains only the picked elements. Useful when you want to pass a collection to an API, which expects an exact number of elements in the collection. Using this function, you can make sure your collection meets the requirements of the API.

## Keywords

The following keywords are available in the General functions tab in Make.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/d5pzzNB81U9fwu2CSxC_D-20260323-085226.png" size="50" width="342" height="280" position="flex-start" alt="General functions - available keywords" darkWidth="342" darkHeight="280" showCaption="false"}

### erase

The erase pill inherits the parameter type of the item it replaces and provides correct error handling of the empty value.

- A **string** or **number** with an erase pill results in a `null` value.
- An **array** with an erase pill results in `[]`.
- A **collection** with an erase pill results in `{}`.

