> For the complete documentation index, see [llms.txt](https://readme.directual.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://readme.directual.com/template-system/comparison-operators.md).

# Comparison Component

### You can see the comparison component in:

* Scenario steps
  * Condition step
  * Search step
* Settings of scheduled scenario start
* Filters, Security Layers in API endpoint settings
* Filters and post-filters in Report settings

{% hint style="info" %}
Note that there is also a [data-type](/data/data-types.md)—operator;
{% endhint %}

Here is a standard Directual comparison component:

![](/files/-M6iWxRd26XUIDKBbZfC)

### The list of operators

There are following operators (lets compare **A** and **B**):

| Operator                       | Description                                                                                                                                                                                                                                                               | Example                                                                                                                                                                            |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **>, <, >=, <=, ==, !=**       | <p>Standard operators: more; less; more or equal; less or equal; equal; not equal.</p><p>Compares different data types.</p>                                                                                                                                               | <p><code>A > B</code></p><p><code>// true for A=5, B = 3;</code></p><p></p><p><code>A == B</code></p><p><code>// true for A = 5, B = '5' (A is number, B is string type</code></p> |
| **in**                         | **B** is an array and contains **A**                                                                                                                                                                                                                                      | <p><code>A in B</code></p><p><code>// true for A = 1, B = 2,3,1,5</code></p>                                                                                                       |
| **equalsDate, equalsDateTime** | <p><strong>A</strong> is date, <strong>B</strong> may be string, operator convert it to a date in <code>YYYY-MM-DDTHH:mm:SS+Z</code> format.</p><p><code>equalsDate</code> compares year+month+date. </p><p><code>equalsDateTime</code> requires the full conformity.</p> | <p><code>A equalsDate B</code></p><p><code>// true for A = 2020-04-01T12:00, B = 2020-04-21T21:10</code></p>                                                                       |
| **like**                       | <p>String <strong>B</strong> contains string <strong>A</strong>, not paying attention to lower case / upper case.</p><p>Acts as a lightweight <code>RegExp</code></p>                                                                                                     | <p><code>A like B</code></p><p><code>// true for A = 'hello', B = 'Mike developed: Hello, world!'</code> </p>                                                                      |
| **regExp**                     | Regular expression, or `regExp` is a sequence of characters that define a search pattern.                                                                                                                                                                                 | Explore details and examples in [RegExp article](/template-system/comparison-operators/regular-expressions.md)                                                                     |
| **isNotNull**                  | Compares **A** and **NULL** (empty field)                                                                                                                                                                                                                                 | <p><code>A isNotNull</code></p><p><code>// false for A = '', true for A = 'hello'</code></p>                                                                                       |
| **isEmpty**                    | Checks if **A** is empty                                                                                                                                                                                                                                                  | <p><code>A isEmpty</code></p><p><code>// false for A = 'hello', true for A = ''</code></p>                                                                                         |
| **arrayContainsAny**           | **A** id an Array and **B** is an array. `arrayContainsAny`means that we can find at least one element of **B** among elements of **A**                                                                                                                                   | <p><code>A arrayContainsAny B</code></p><p><code>// true for A = 1,2,3 and B = 4,3,0,a (3 is a common element)</code></p>                                                          |
| **arrayContainsAll**           | **A** id an Array and **B** is an array. `arrayContainsAll`means that we can find all the elements of **B** among elements of **A**                                                                                                                                       | <p><code>A arrayContainsAny B</code></p><p><code>// true for A = 1,2,3 and B = 2,3</code></p><p><code>// false for A = 1,2,3 and B = 2,0</code></p>                                |
