JSON Path used for mapping data is used from library JSONPath.
JSON Path | Documentation |
---|---|
$.* |
Always true condition. |
book[2] |
Returns third element of book |
$.[book1,book2] |
Returns values of fields book1 and book2. If field is not marked as multiple, only first value will be stored. |
$.emails.[?(@.type=="work")].email |
Returns email of type ‘work’ |
$.[?(@.AAA=="true")].BBB |
Returns BBB if condition with AAA is met. |
“Journal No.” / “Date completed (UTC)”
Expressions
- ${“e -mail”}
- ${$root.dativery_embeded_item_index}
- ${$parent.id + ‘-‘ + $root.dativery_embeded_item_index}
- ${$root.DIC != ‘Skupinove_DPH’ ? $root.DIC : ”}
- ${abs($root.column0.value)}
- ${$root.amount / 100}
- ${trim($root.DIC + ‘ ‘ + $root.netto)}
- ${coalesce($root.VarSym, $root.RefNo)}
- ${coalesce(“$root.Order ID”, “$root.ID objednávky”)}
- ${substring($root.PSU, 5, 6)}
- ${$root.netto_CRDB == ‘CR’ ? $root.netto : ($root.netto_CRDB == ‘DB’ ? ($root.netto * -1) : ”)}
- ${$root.incoming === true ? $root.value : ($root.value * -1)}
- ${$root.address1 + if(podminka, při splnění, při nesplnění)} – např.:
${$root.address1 + if($root.address2, “, ” + $root.address2, “”)} - ${“$root.Text key” === ‘COM’ ? true : false}
- ${currency} – application variable
- ${regexpmatch(str, “^([^/]+)”)} – regulární výraz vytahující data před lomítkem
- ${regexpmatch(str, “/([^/]+)$”)} – regulární výraz vytahující data za lomítkem
- ${substring(hash(‘sha256’, “$root.Transaction Date” + ‘|’ + $root.Order), 0, 20)}
Operators
- == equals
- != not equals
- <= lower or equal then
- >= greater or equal then
- ~= contains
- > greater then
- < lower then
Date formats
For formats we are using library momentjs
. See moment.js documentation.
X | Unix timestamp |
---|---|
x | Unix ms timestamp |
MM-DD-YYYY HH:mm Z | 02-20-2017 23:58 UTC |
DD-MM-YYYY HH:mm Z | 20-02-2017 23:58 UTC |