Discover more about each operation that can be used in the Transformer (JOLT) and how to use it on the Digibee Integration Platform.
This article shows examples of the following JOLT operations (string):
shift
sort
cardinality
modify-overwrite-beta
remove
shift
Used to change JSON values or parts of the input tree, and add them to specified locations at the output. The structure is summarized into browsing up to the variable or JSON object that is intended to change the structure, place : (colon) and between "" quotation marks, inform the object destination.
* (asterisk): refer to "all elements" within an object.
& (ampersand): copy the variable name to the destination.
Used to allow using predefined functions at JOLT to change values and even the type of elements.
Functions include basic string and mathematic operations (toLower, toUpper, concat, min / max / abs, toInteger, toDouble, toInt), and can be applied to the origin JSON values.
[
{
"operation": "modify-overwrite-beta",
"spec": {
"counterTop": {
"jar2": {
//accessing the "contents" element and changing its value to upper
"contents": "=toUpper"
}
}
}
}
]
Used to sort the entire JSON input at the output. Sorting cannot be configured; the entire JSON will be affected.
Sorting does not consider variable amounts, only its name.
The Output will be alphabetically sorted. (Note: following the JSON structure convention, the variable order does not change their structure/behavior.)