> ## Documentation Index
> Fetch the complete documentation index at: https://rpa.bazhuayu.com/helpcenter/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取指定键的值

## 指令说明

**描述：** 在字典中获取键值

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getdictionaryvaluecommand-01.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=6b72212fbe10d1886cafb0cec08bee0b" alt="获取指定键的值指令参数面板" width="648" height="460" data-path="helpcenter/commands/data-processing/images/getdictionaryvaluecommand-01.png" />

    | 参数        | 说明         |
    | --------- | ---------- |
    | **字典**    | 输入字典变量     |
    | **键名**    | 输入待查找的键名   |
    | **键不存在时** | 选择报错或返回默认值 |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getdictionaryvaluecommand-02.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=8058805046a1c878b0b30de54a7a7de8" alt="获取指定键的值使用示例 - 流程搭建" width="850" height="241" data-path="helpcenter/commands/data-processing/images/getdictionaryvaluecommand-02.png" />

**该流程执行逻辑：**

本例演示【获取指定键的值】指令的配置与执行：

1. 选择字典变量并输入要查询的键名。
2. 读取该键对应的值；当键不存在时，按设置的处理方式返回结果。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getdictionaryvaluecommand-03.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=24204483fffe14f0563f58bf6b1372ea" alt="获取指定键的值使用示例 - 效果展示" width="834" height="246" data-path="helpcenter/commands/data-processing/images/getdictionaryvaluecommand-03.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/GBkSeqm2b688g4En/helpcenter/commands/data-processing/images/getdictionaryvaluecommand-04.png?fit=max&auto=format&n=GBkSeqm2b688g4En&q=85&s=90dd39bcafe60df7694bc2f24e5f92fc" alt="获取指定键的值使用示例 - 效果展示" width="835" height="232" data-path="helpcenter/commands/data-processing/images/getdictionaryvaluecommand-04.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
