> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/pantherflow/functions/array.md).

# 배열 함수

{% hint style="info" %}
PantherFlow는 Panther 버전 1.110부터 공개 베타로 제공되며, 모든 고객이 사용할 수 있습니다. 버그 보고와 기능 요청은 Panther 지원팀에 공유해 주세요.
{% endhint %}

## `arrays.difference()`

`arrays.difference(arr: [any], excluded_arr: [any]) -> [any]`

다음의 요소를 포함하는 배열을 반환합니다 `arr` 에 없는 `excluded_arr`.

**예:**

```kusto
panther_logs.public.aws_alb
| project ips=arrays.difference(p_any_ip_addresses, p_any_trace_ids)
```

## `arrays.filter()`

`arrays.filter(array: [any], func: fn) -> [any]`

실행합니다 `func` 의 각 요소에 대해 `배열` 반환값이 true인 요소만 포함하는 새 배열을 반환합니다. `func` 함수 정의에 대해 자세히 알아보세요. [PantherFlow 식](https://docs.panther.com/pantherflow/expressions#functions).

**예:**

```kusto
datatable [{"a": [1, 2, 3]}]
| extend a_even=arrays.filter(a, fn (elem) { elem % 2 == 0 })
```

## `arrays.flatten()`

`arrays.flatten(array: [any]) -> [any]`

다음 경우 `배열` 중첩 배열의 모든 요소를 포함하는 단일 배열을 반환합니다.

**예:**

```kusto
datatable [{"a": [[1, 2], [3]]}]
| extend a_flattened=arrays.flatten(a)
```

## `arrays.intersection()`

`arrays.intersection(arr1: [any], arr2: [any]) -> [any]`

다음 두 배열에 모두 있는 요소만 포함하는 배열을 반환합니다 `arr1` 및 `arr2`.

**예:**

```kusto
panther_logs.public.aws_alb
| project ips=arrays.intersection(p_any_ip_addresses, p_any_trace_ids)
```

## `arrays.len()`

`arrays.len(arr: [any]) -> int`

의 길이를 반환합니다 `arr`. If `arr` 배열이 아니면 먼저 JSON으로 변환됩니다.

**예:**

```kusto
panther_logs.public.aws_alb
| project ipsFound=arrays.len(p_any_ip_addresses)
```

## `arrays.map()`

`arrays.map(array: [any], func: fn) -> [any]`

실행합니다 `func` 의 각 요소에 대해 `배열` 를 실행하고 결과 배열을 반환합니다. 함수 정의에 대해 자세히 알아보세요. [PantherFlow 식](https://docs.panther.com/pantherflow/expressions#functions).

**예:**

```kusto
datatable [{"a": [1, 2, 3]}]
| extend a_plus_one=arrays.map(a, fn (elem) { elem + 1 })
```

## `arrays.overlap()`

`arrays.overlap(arr1: [any], arr2: [any]) -> bool`

다음과 일치하면 true를 반환합니다 `arr1` 및 `arr2` 공통 요소가 하나라도 있습니다.

**예:**

```kusto
panther_logs.public.aws_alb
| project tracesHadIps=arrays.overlap(p_any_ip_addresses, p_any_trace_ids)
```

## `arrays.sort()`

`arrays.sort(arr: [any] [, sort_asc: bool] [, nulls_first: bool]) -> [any]`

입력 배열의 요소를 포함하는 배열을 반환합니다 `arr` 오름차순 또는 내림차순으로 정렬됩니다. 기본값은 오름차순입니다. null 요소를 null이 아닌 요소보다 앞에 둘지 뒤에 둘지 지정할 수 있습니다. 기본값은 오름차순에서는 null이 마지막이고 내림차순에서는 null이 처음입니다.

**예:**

```kusto
panther_logs.public.aws_alb
| project tracesSorted=arrays.sort(p_any_trace_ids, false)
```

## `arrays.union()`

`arrays.union(arr1: [any], arr2: [any]) -> [any]`

의 중복을 제거한 모든 요소를 포함하는 배열을 반환합니다 `arr1` 및 `arr2`.

**예:**

```kusto
panther_logs.public.aws_alb
| project ips=arrays.union(p_any_ip_addresses, p_any_trace_ids)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/pantherflow/functions/array.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
