> 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/expressions.md).

# PantherFlow 표현식

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

## 참고 자료

### 배열 참조

<table><thead><tr><th width="173.33333333333331">구문</th><th width="200">설명</th><th>예시</th></tr></thead><tbody><tr><td><code>array[X]</code></td><td>X의 값을 가져오기</td><td><code>foo[1]</code></td></tr></tbody></table>

### 객체 참조

<table><thead><tr><th width="173.33333333333331">구문</th><th width="200">설명</th><th>예시</th></tr></thead><tbody><tr><td><code>object['X']</code></td><td>X의 값을 가져오기</td><td><code>foo['bar']</code></td></tr><tr><td><code>object.X</code></td><td>X의 값을 가져오기</td><td><code>foo.bar</code></td></tr></tbody></table>

## 비교

### 동등성 비교

<table><thead><tr><th width="145.33333333333331">연산자</th><th width="172">설명</th><th>예시</th><th data-hidden>연산자</th><th data-hidden>의미</th></tr></thead><tbody><tr><td><code>==</code></td><td>동등</td><td><code>A == B</code></td><td>==</td><td></td></tr><tr><td><code>!=</code></td><td>부등</td><td><code>A != B</code></td><td>!=</td><td></td></tr></tbody></table>

### 불리언 비교

<table><thead><tr><th width="149.33333333333331">연산자</th><th width="158">설명</th><th>예시</th><th data-hidden>연산자</th><th data-hidden>의미</th></tr></thead><tbody><tr><td><code>그리고</code></td><td>논리 AND</td><td><code>A and B</code></td><td>그리고</td><td></td></tr><tr><td><code>또는</code></td><td>논리 OR</td><td><code>A or B</code></td><td>또는</td><td></td></tr><tr><td><code>이 아니라</code></td><td>논리 NOT</td><td><code>not A</code></td><td>이 아니라</td><td></td></tr></tbody></table>

### 수치 비교

<table><thead><tr><th width="126.33333333333331">구문</th><th width="245">설명</th><th>예시</th></tr></thead><tbody><tr><td><code>&#x3C;</code></td><td>보다 작음</td><td><code>A &#x3C; B</code></td></tr><tr><td><code>&#x3C;=</code></td><td>보다 작거나 같음</td><td><code>A &#x3C;= B</code></td></tr><tr><td><code>></code></td><td>보다 큼</td><td><code>A > B</code></td></tr><tr><td><code>>=</code></td><td>보다 크거나 같음</td><td><code>A >= B</code></td></tr><tr><td><code>+</code></td><td>추가</td><td><code>A + B</code></td></tr><tr><td><code>-</code></td><td>빼기</td><td><code>A - B</code></td></tr><tr><td><code>*</code></td><td>곱하기</td><td><code>A * B</code></td></tr><tr><td><code>/</code></td><td>나누기</td><td><code>A / B</code></td></tr><tr><td><code>%</code></td><td>나머지</td><td><code>A % B</code></td></tr></tbody></table>

### 배열 비교

<table><thead><tr><th width="142.33333333333331">구문</th><th width="194">설명</th><th>예시</th></tr></thead><tbody><tr><td><code>내</code></td><td>값이 배열에 포함됨</td><td><code>X in [X, Y, Z]</code>, <code>'10.10.10.100' in p_any_ip_addresses</code></td></tr><tr><td><code>not in</code></td><td>값이 배열에 포함되지 않음</td><td><code>X not in [A, B, C]</code></td></tr></tbody></table>

### 범위 비교

<table><thead><tr><th width="166">연산자</th><th width="248">설명</th><th>예시</th></tr></thead><tbody><tr><td><code>사이</code></td><td>값이 두 값(포함) 사이에 있으며, 둘은 다음으로 구분됨 <code>..</code></td><td><code>&#x3C;foo> between &#x3C;begin> .. &#x3C;end></code></td></tr><tr><td><code>사이 아님</code></td><td>값이 두 값(배타적) 사이에 있지 않으며, 둘은 다음으로 구분됨 <code>..</code></td><td><code>&#x3C;foo> not between &#x3C;begin> .. &#x3C;end></code></td></tr></tbody></table>

## 함수

### 익명 함수

익명 함수, 또는 "람다 함수"는 이름이 없는 함수로, 다음의 인수로 사용할 수 있습니다. `arrays.map()` 그리고 `arrays.filter()` 함수입니다. 익명 함수는 매개변수가 없거나 여러 개일 수 있으며, 본문은 표현식입니다:

```kusto
fn ([arg1] [, arg2...]]) { <expr> }
```

#### 예: **다음의 숫자에 1을 더하기 `arrays.map()`**

아래 예에서, 익명 함수는 다음의 첫 번째 인수로 제공된 배열의 각 요소에 적용됩니다 `arrays.map()`:

```kusto
arrays.map([1, 2, 3], fn (r) { r + 1 })
```

다음을 `arrays.map()` 함수가 각 요소에 적용되면 배열은 다음과 같아집니다:

```kusto
[2, 3, 4]
```

#### **예: 다음에서 null과 비교 `arrays.filter()`**

아래 예에서, `arrays.filter()` 필터 조건으로 익명 함수를 사용합니다:

```kusto
arrays.filter([null, 5, null, 6], fn (elem) { elem != null })
```

다음을 `arrays.filter()` 익명 함수를 사용해 목록을 필터링하면 다음과 같아집니다:

```kusto
[5, 6]
```

#### **예: 여러 익명 함수 중첩하기**

익명 함수를 중첩하거나, 다른 익명 함수의 본문에서 익명 함수를 사용할 수 있습니다. 이는 배열 안의 배열을 추출하는 데 유용할 수 있습니다:

```kusto
let source = datatable [{
  "results": [
    {
      "cats": [
        {
          "Name": "Whiskers",
          "Breed": "Siamese",
          "FurLength": "Short",
          "ID": "AAAAA"
        },
        {
          "Name": "Mittens",
          "Breed": "Maine Coon",
          "FurLength": "Long",
          "ID": "BBBBB"
        }
      ]
    },
    {
      "cats": [
        {
          "Name": "Mr. Meow",
          "Breed": "Orange Tabby",
          "FurLength": "Short",
          "ID": "CCCCC"
        },
        {
          "Name": "Mrs. Meow",
          "Breed": "Persian",
          "FurLength": "Long",
          "ID": "DDDDD"
        }
      ]
    }
  ]
}];

소스
| project results=arrays.flatten(
    arrays.map(results, fn (result) { 
        arrays.map(result.cats, fn (cat) { 
            object("CatName", cat.Name, "ID", cat.ID) 
        })
    })
)
```

| results                                                                                                                                             |
| --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[{"CatName":"Whiskers","ID":"AAAAA"},{"CatName":"Mittens","ID":"BBBBB"},{"CatName":"Mr. Meow","ID":"CCCCC"},{"CatName":"Mrs. Meow","ID":"DDDDD"}]` |


---

# 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:

```
GET https://docs.panther.com/ko/pantherflow/expressions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
