---
updatedAt: 2025-05-20T20:28:41.000Z
agentTools:
  projectIndex: https://docs.documotor.com/llms.txt
---

# not_null

Find first argument that is not null

# Definition

`any not_null(any *$argument [, any $...])`

Returns the first argument that does not resolve to null. Accepts one or more arguments, and will evaluate them in order until a non-null argument is encountered. If all arguments' values resolve to `null`, then a value of null is returned.

# Parameters

<Glossary>any</Glossary> `*$argument`

One or more arguments of any type, separated by comma.

# Returns

<Glossary>any</Glossary>

The first argument provided that does not resolve to `null`.

# Examples

```json Sample data
{
  "null1": null,
  "null2": null,
  "empty_array": [],
  "text": "alpha"
}
```

```text Transformation
{
  a: not_null(nonexistent, null1, null2, empty_array, text),
  b: not_null(null1, null2, `null`, text, empty_array),
  c: not_null(null1, null2)
}
```

```json Result
{
  "a": [],
  "b": "alpha",
  "c": null
}
```