Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Expression


Code Block
$.hasOwnProperty('customer.lastname') || 'default'


DescriptionThe expression verifies if $customer.lastname exists in the input document. It returns True if $customer.lastname exists, else it shows 'default' as a string and applies it to the target path. 

Checking for a Non-empty String and an Existing Value

Expression


Code Block
($.hasOwnProperty('customer.lastname') && $customer.lastname.trim()) || 'default''


DescriptionThe expression verifies if a property exists in the input document and if $customer.lastname and $customer.lastname.trim() provide a value. If it does then it applies its value to the target pathgpath, otherwise it applies 'default' to the target path.

...