> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> JSON 컬럼에 저장된 중복 없는 경로 목록을 계산합니다.

# distinctJSONPaths

<div id="distinctJSONPaths">
  ## distinctJSONPaths
</div>

도입 버전: v24.9.0

[JSON](/ko/reference/data-types/newjson) 컬럼에 저장된 고유 경로 목록을 계산합니다.

**구문**

```sql theme={null}
distinctJSONPaths(json)
```

**인수**

* `json` — JSON 컬럼. [`JSON`](/ko/reference/data-types/newjson)

**반환 값**

정렬된 경로 목록을 반환합니다. [`Array(String)`](/ko/reference/data-types/array)

**예시**

**중첩 JSON 기본 사용법**

```sql title=Query theme={null}
DROP TABLE IF EXISTS test_json;
CREATE TABLE test_json(json JSON) ENGINE = Memory;
INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}');

SELECT distinctJSONPaths(json) FROM test_json;
```

```response title=Response theme={null}
┌─distinctJSONPaths(json)───┐
│ ['a','b','c.d.e','c.d.f'] │
└───────────────────────────┘
```

**선언된 JSON 경로가 있는 경우**

```sql title=Query theme={null}
DROP TABLE IF EXISTS test_json;
CREATE TABLE test_json(json JSON) ENGINE = Memory;
INSERT INTO test_json VALUES ('{"a" : 42, "b" : "Hello"}'), ('{"b" : [1, 2, 3], "c" : {"d" : {"e" : "2020-01-01"}}}'), ('{"a" : 43, "c" : {"d" : {"f" : [{"g" : 42}]}}}')

SELECT distinctJSONPaths(json) FROM test_json;
```

```response title=Response theme={null}
┌─distinctJSONPaths(json)─┐
│ ['a','b','c']           │
└─────────────────────────┘
```
