Skip to content

Next

Unreleased changes.

Checking if a value exists in another value

Section titled “Checking if a value exists in another value”

The new contains() function recursively searches for a value within data structures and returns true if found, false otherwise.

By @raxyte in #5493.

We have added two new functions that make managing set-like lists easier.

The add function ensures uniqueness when building lists. Perfect for maintaining deduplicated threat intel feeds or collecting unique user sessions:

from {xs: [1]},
{xs: [2]},
{xs: []}
select result = xs.add(2)
{result: [1,2]}
{result: [2]}
{result: [2]}

The remove function cleans up your lists by eliminating all occurrences of unwanted elements. Ideal for filtering out known-good domains from suspicious activity logs or removing false positives from alert lists:

from {xs: [1, 2, 1, 3], y: 1},
{xs: [4, 5], y: 1},
select result = xs.remove(y)
{result: [2, 3]}
{result: [4, 5]}

By @mavam, @IyeOnline in #5471.

File paths containing spaces are now properly handled by operators.

By @raxyte in #5499.

Last updated: