# JSON\_PATH

JSON 객체에서 데이터를 추출합니다.

## 문법

```
JSON_PATH(path, JSON)
```

## 인수

| 이름 | 유형 | 설명 | 기본값 |
| --- | --- | --- | --- |
| 경로 | 문자열 | JSON 경로 식 |  |
| JSON | 문자열 | JSON 문서가 포함된 문자열 |  |

## 예

| 경로 | JSON | 출력 |
| --- | --- | --- |
| `"$[*].author.name"` | `"[{"name": "The Great Gatsby", "author": {"name": "F. Scott Fitzgerald"}}, {"name": "Nineteen Eighty-Four", "author": {"name": "George Orwell"}}]` | `[F. Scott Fitzgerald, George Orwell]` |
| `"net_id"` | `"{ "net_id": 41 }"` | `41` |
| `"net_id"` | `"{ "net_id": [41, 42] }"` | `[41,42]` |
| `"net_id[*]"` | `"{ "net_id": [41, 42] }"` | [`41`, `42`] |
| `"net_id.parent"` | `"{ "net_id": [41, 42] }"` | null |
| `"$[*]"` | `"[1,2,3]"` | [`1`, `2`, `3`] |
| `"$[*].author"` | `"[{"name":"The Great Gatsby", "author":{"name": "F. Scott Fitzgerald"}}, {"name":"Nineteen Eighty-Four", "author": {"name": "George Orwell"}}]` | `[{"name":"F. Scott Fitzgerald"}, {"name":"George Orwell"}]` |