# 字典節點

Dynamo 2.0 公開各種字典節點供我們使用。這包括 *建立、動作和查詢* 節點。

!

#### 建立

1. `Dictionary.ByKeysValues` 將使用提供的值和鍵建立字典。*(項目數目會是最短的清單輸入)*

#### 動作

2. `Dictionary.Components` 將產生輸入字典的元件。*(這是建立節點的反轉過程)。*
3. `Dictionary.RemoveKeys` 將產生新的字典物件但移除輸入鍵。
4. `Dictionary.SetValueAtKeys` 將根據輸入鍵與值產生新字典，以取代對應鍵處的目前值。
5. `Dictionary.ValueAtKey` 會傳回輸入鍵處的值。

#### 查詢

6. `Dictionary.Count` 會告訴您字典中有多少個鍵值對。
7. `Dictionary.Keys` 會傳回字典中目前儲存哪些鍵。
8. `Dictionary.Values` 會傳回字典中目前儲存哪些值。

字典的整體相關資料是處理索引和清單的舊方法的重要替代方法。


---

# Agent Instructions: 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://primer2.dynamobim.org/zh-tw/5_essential_nodes_and_concepts/5-5_dictionaries-in-dynamo/2-node-uses.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.
