Closed Early Access just started: Discover what's coming in v4.0.
Learn more

General functions

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. Below is a list of general functions you can use in your scenarios.

Variables

executionId

Returns the ID of the current execution. Useful for logging and monitoring purposes.

Functions

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.

get(array;1+1)
get(array;5.raw_name)
get(object;raw_name)
get(object;raw_name.sub_raw_name)

if

  • (expression; value1; value2)

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

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

ifempty

  • (value1; value2)

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

ifempty(A;B) = A
ifempty(unknown;B) = B
ifempty("";B) = B

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.

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

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

  • (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.