Objects

A object is a collection of unordered name/value pairs, where each pair is separated by a comma. Objects are indicated by the use of curly brace notation { }.

The name can be any string while the value can be a string set in double quotes, a boolean true, false or null, and even an object or an array.

For example, the following shows an object containing a set of name/value pairs where the names are strings and the values are numbers, integers, boolean values and strings.

{
"fuel_consumption": 12.6,
"in_stock": true,
"model_id": 947432,
"topspeed_kmh": 220,
"variant_id": "QLM_KROSUS_4_DOORS_LIMO"
}

Nesting objects

The root of a schema is always an object. Within this object, any data type can be used. Objects can be nested. For example, the following object includes several literals of variouis types, an array called "extras" and an object which is the value of "engine".

{
"base_price_USD": 25802.46,
"engine_type_id": 547290,
"extras": [
""
],
"fuel_consumption_lkm": 12.6,
"in_stock": true,
"model_id": 947432,
"topspeed_kmh": 220,
"variant_id": "QLM_KROSUS_4_DOORS_LIMO"
"engine": {
"power_hp": "180"
},
}

Using objects in the Formula editor

For example, the following query attribute consists of an object that includes two literals:

  • latitude: "40.7243"

  • longitude: "-74.0018"

It is mapped to an element in a query parameter called ll the value of which is derived from this formula:

  • CONCATENATE(request.query.latitude, ',', request.query.longitude)

This is shown in the following Mapping dashboard.

Using objects in the Formula editor