Skip to main content

Like

Vasyl MartyniukLess than 1 minute

Assets if the left value is similar to the right. The * (asterisk) symbol represents any character or wildcard. For example, the condition below returns true if the user's display name is "John Smith", "Johnny" or "John".

{
  "Condition": {
    "Like": {
      "${USER.display_name}": "John*"
    }
  }
}

The asterisk can be places can be places anywhere in the string. For example, the following condition check if user email ends with @gmail.com:

{
  "Condition": {
    "Like": {
      "${USER.user_email}": "*@gmail.com"
    }
  }
}

Another example of the asterisk been places in the middle of the string:

{
  "Condition": {
    "Like": {
      "${HTTP_GET.order_id}": "shop*01"
    }
  }
}

The last condition will return true if the HTTP get param in URL matches strings like shop09201 or shopHere8901.