# In test

Learn how to check if an element exists in a collection.

This test checks whether an element is in a collection. It works the same way as the [`contains`](/reference/cql/expressions/tests/collection/contains) test, but with the operands reversed.

You can use any collection type, including lists and maps. Keys are ignored when checking whether a map contains an element.

When comparing elements, this test uses the same [equivalence rules](/reference/cql/expressions/operations/comparison/overview#equivalence) as the [`equal`](/reference/cql/expressions/operations/comparison/equal) operation to ensure consistency in how it determines whether two items are equal.

## Syntax \[#in-syntax]

This test has the following syntax:

```cql
/*<element>*/ is in /*<collection>*/
```

You can negate the test to verify the contrary:

```cql
/*<element>*/ is not in /*<collection>*/
```

## Parameters \[#in-parameters]

These are the supported parameters:

- `element`: `any`

  The element to search for in the collection.

- `collection`: `collection`

  The collection to check.

## Examples \[#in-examples]

Here is a simple example that checks whether an element is in a list:

```cql
"b" is in ["a", "b", "c"] // true
```

To negate the test, you can write:

```cql
"b" is not in ["a", "b", "c"] // false
```
