Skip to content

重命名键#

¥Rename Keys

使用 Rename Keys 节点重命名 n8n 中键值对的键。

¥Use the Rename Keys node to rename the keys of a key-value pair in n8n.

节点参数#

¥Node parameters

你可以使用“重命名密钥”节点重命名一个或多个密钥。选择“添加新键”按钮以重命名键。

¥You can rename one or multiple keys using the Rename Keys node. Select the Add new key button to rename a key.

对于每个键,请输入:

¥For each key, enter the:

  • 当前密钥名称:要重命名的键的当前名称。

¥Current Key Name: The current name of the key you want to rename.

  • 新建键名:你要为键分配的新名称。

¥New Key Name: The new name you want to assign to the key.

节点选项#

¥Node options

选择是否使用正则表达式来识别要重命名的键。要使用此选项,你还必须输入:

¥Choose whether to use a Regex regular expression to identify keys to rename. To use this option, you must also enter:

  • 你要使用的正则表达式。

¥The Regular Expression you'd like to use.

  • 替换为:输入你希望分配给与正则表达式匹配的键的新名称。

¥Replace With: Enter the new name you want to assign to the key(s) that match the Regular Expression.

  • 你还可以选择以下特定于正则表达式的选项:

¥You can also choose these Regex-specific options:

  • 不区分大小写:设置正则表达式是否区分大小写(已关闭)或不区分大小写(已开启)。

    ¥Case Insensitive: Set whether the regular expression should match case (turned off) or be case insensitive (turned on).

  • 最大深度:输入替换键的最大深度,-1 表示无限制,0 表示仅替换顶层键。

    ¥Max Depth: Enter the maximum depth to replace keys, using -1 for unlimited and 0 for top-level only.

Regex impacts

使用正则表达式可能会影响任何与该表达式匹配的键,包括你已重命名的键。

¥Using a regular expression can affect any keys that match the expression, including keys you've already renamed.

模板和示例#

¥Templates and examples

Template widget placeholder.