Skip to content

contains_null

Checks whether the input contains any null values.

contains_null(x:any) -> bool

The contains_null function checks if the input contains any null values recursively.

The input to check for null values.

from {x: [{a: 1}, {}]}
contains_null = x.contains_null()
{
x: [
{
a: 1,
},
{
a: null,
},
],
contains_null: true,
}
from {x: "foo", y: null}
contains_null = this.contains_null()
{
x: "foo",
y: null,
contains_null: true,
}

has, is_empty

Last updated: