get (Read value from data field)

The $get function is used to read a data field value from a specific object. The data field can be specified as a data field path (see parameter list).

Syntax

$get(host,dataField)

Parameter

Name

Description

host

The object from which the data field path is to be evaluated.

dataField

The path to a data field.
As always, path parts are separated by points (periods/fullstops). e.g. 'datenFeldLevel1.datenFeldLevel2'.
List entries can be accessed via the index (starting at 0) as a data field.
e.g. 'datenFeldDerListe.3' → accesses the fourth element of a list.

Return value

Returns the value that was read from the specified data field or null if the data field does not exist or is empty.

Example

The following object is given, which is transferred to the calculation function:

Example host object in JSON format
{
"person": {
"name": "Robert Weber",
"age": "32",
"tasks": [
"IT Leiter",
"3rd Level Support",
"Software Customizing"
]
}
}

The object shown above is transferred to the calculation expression as an input object ($input). As a result of the expression, both the name of the person and their primary task (first element of tasks) should be returned.

$get($input,person.name) - $get($input,person.tasks.0)

The result of the example for the object shown above is: 'Robert Weber – IT Manager'.