array_length - Reference Guide - Cortex XDR - Cortex - Security Operations

Cortex XDR XQL Language Reference

Product
Cortex XDR
Creation date
2024-07-16
Last date published
2024-10-06
Category
Reference Guide
Abstract

Learn more about the Cortex Query Language array_length() function that returns the length of an array.

Syntax

array_length (<array>)

Description

The array_length() function returns the number of elements in an array.

Example

dataset = xdr_data 
| fields action_local_ip as alii 
| alter ip_len = array_length(split(alii, ".")) 
| filter alii != null and alii != "0.0.0.0" 
| limit 1