> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.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](/ar/reference/data-types/newjson).

**الصيغة**

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

**الوسيطات**

* `json` — عمود JSON. [`JSON`](/ar/reference/data-types/newjson)

**القيمة المُعادة**

يُرجع قائمة المسارات المرتبة. [`Array(String)`](/ar/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']           │
└─────────────────────────┘
```
