Skip to content

Rename Keys 节点#

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

节点参数#

您可以使用 Rename Keys 节点重命名一个或多个键。选择 Add new key 添加新键 按钮来重命名键。

对于每个键,输入:

  • Current Key Name 当前键名:您要重命名的键的当前名称。
  • New Key Name 新键名:您要分配给键的新名称。

节点选项#

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

  • 您要使用的 Regular Expression 正则表达式
  • Replace With 替换为:输入您要分配给匹配 Regular Expression 正则表达式 的键的新名称。
  • 您还可以选择这些正则表达式特定选项:
    • Case Insensitive 不区分大小写:设置正则表达式是否应匹配大小写(关闭)或不区分大小写(开启)。
    • Max Depth 最大深度:输入替换键的最大深度,使用 -1 表示无限制,0 表示仅顶级。

正则表达式影响

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

模板和示例#

Explore n8n Nodes in a Visual Reference Library

by I versus AI

View template details
Create Salesforce accounts based on Google Sheets data

by Tom

View template details
Create Salesforce accounts based on Excel 365 data

by Tom

View template details
Browse Rename Keys integration templates, or search all templates