Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fgeneral%2Fin.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fgeneral%2Fin.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `in`

## Description

Return `true` if a given value matches any value in a list of candidates, otherwise return `false`.

## Syntax

Like many functions in DataPrime, `in` supports<!-- --> [two notations](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
in(comparand: any, value: any, ...values: any): bool
```

```
(comparand: any).in(value: any, ...values: any): bool
```

## Arguments

| Name        | Type  | Required | Description                              |
| ----------- | ----- | -------- | ---------------------------------------- |
| `comparand` | `any` | **true** | The value to check                       |
| `value`     | `any` | **true** | The first candidate to compare against   |
| `...values` | `any` | **true** | Additional candidates to compare against |

## Example

**Use case: Flag membership in a predefined group**

A team name can be compared against a list of department members to determine if it belongs to Engineering.

### Example data

```
{

    "team": "Developers"

},

{

    "team": "Marketing"

},

{

    "team": "QA Testing"

}
```

### Example query

* Function notation
* Method notation

```
create is_in_engineering from in(team, 'Developers', 'QA Testing', 'Front End Engineers', 'DevOps Team')
```

```
create is_in_engineering from team.in('Developers', 'QA Testing', 'Front End Engineers', 'DevOps Team')
```

### Example output

```
{

    "team": "Developers",

    "is_in_engineering": true

},

{

    "team": "Marketing",

    "is_in_engineering": false

},

{

    "team": "QA Testing",

    "is_in_engineering": true

}
```
