输入/搜索内容
节点
手动触发器
定时触发器
RSS 订阅触发器
K线收盘触发器
Discord 触发器
Telegram 触发器
Slack 触发器
AI 智能体
情绪分析
MCP 客户端
OpenAI 模型
Anthropic 聊天模型
代码工具
HTTP 请求工具
MCP 客户端工具
代码
HTTP请求
编辑字段(设置)
筛选器
IF
遍历项目
合并
聚合
比较数据集
转换为文件
加密
数据库
从文件提取
HTML
限制
日志
空操作,不执行任何操作
RSS 读取
从磁盘读取文件
去除重复项
重命名键
S3
排序
拆分输出
停止并报错
汇总
Switch
Telegram
等待
将文件写入磁盘
XML
APP端应用推送
钉钉机器人
Discord 机器人
电子邮件
飞书自定义机器人
Slack
账户信息
市场信息
交易执行器
指标
交易插件
凭证


使用编辑字段节点来设置工作流数据。该节点可以设置新数据以及覆盖现有数据。该节点对于需要从前置节点接收数据的工作流至关重要,例如向 Google Sheets 或数据库插入值时。

节点参数

以下是编辑字段节点中可用的设置和选项。

模式

您可以使用手动映射通过 GUI 编辑字段,或使用 JSON 输出编写将添加到输入数据的 JSON。

要设置的字段

如果您选择模式 > 手动映射,您可以通过从输入拖放值来配置字段。

拖动值时的默认行为是:

  • 系统将值的名称设置为字段名称。
  • 字段值包含访问该值的表达式。

如果您不想使用表达式:

  1. 将鼠标悬停在字段上。将出现固定 | 表达式切换按钮。
  2. 选择固定。

您可以将此应用于字段的名称和值。

仅保留设置的字段

启用此选项可丢弃您在要设置的字段中未使用的任何输入数据。

包含在输出中

选择要包含在节点输出数据中的输入数据。

节点选项

使用这些选项来自定义节点的行为。

包含二进制数据

如果输入数据包含二进制数据,选择是否将其包含在编辑字段节点的输出数据中。

忽略类型转换错误

仅限手动映射。

启用此选项允许节点在映射字段时忽略某些数据类型错误。

支持点符号

默认情况下支持点符号。

例如,使用手动映射时,节点遵循名称字段的点符号。这意味着如果您在名称字段中设置名称为 number.one,在值字段中设置值为 20,生成的 JSON 为:

json
{ "number": { "one": 20 } }

您可以通过选择添加选项 > 支持点符号并将点符号字段设置为关闭来禁用此行为。生成的 JSON 将变为:

json
{ "number.one": 20 }

JSON 输出模式中的数组和表达式

创建 JSON 输出时可以使用数组和表达式。

例如,给定由客户数据存储节点生成的以下输入数据:

json
[ { "id": "23423532", "name": "Jay Gatsby", "email": "gatsby@west-egg.com", "notes": "Keeps asking about a green light??", "country": "US", "created": "1925-04-10" }, { "id": "23423533", "name": "José Arcadio Buendía", "email": "jab@macondo.co", "notes": "Lots of people named after him. Very confusing", "country": "CO", "created": "1967-05-05" }, { "id": "23423534", "name": "Max Sendak", "email": "info@in-and-out-of-weeks.org", "notes": "Keeps rolling his terrible eyes", "country": "US", "created": "1963-04-09" }, { "id": "23423535", "name": "Zaphod Beeblebrox", "email": "captain@heartofgold.com", "notes": "Felt like I was talking to more than one person", "country": null, "created": "1979-10-12" }, { "id": "23423536", "name": "Edmund Pevensie", "email": "edmund@narnia.gov", "notes": "Passionate sailor", "country": "UK", "created": "1950-10-16" } ]

在 JSON 输出字段中添加以下 JSON,并将包含在输出中设置为所有输入字段:

json
{ "newKey": "new value", "array": [{{ $json.id }},"{{ $json.name }}"], "object": { "innerKey1": "new value", "innerKey2": "{{ $json.id }}", "innerKey3": "{{ $json.name }}", } }

您将收到以下输出:

json
[ { "id": "23423532", "name": "Jay Gatsby", "email": "gatsby@west-egg.com", "notes": "Keeps asking about a green light??", "country": "US", "created": "1925-04-10", "newKey": "new value", "array": [23423532, "Jay Gatsby"], "object": { "innerKey1": "new value", "innerKey2": "23423532", "innerKey3": "Jay Gatsby" } }, { "id": "23423533", "name": "José Arcadio Buendía", "email": "jab@macondo.co", "notes": "Lots of people named after him. Very confusing", "country": "CO", "created": "1967-05-05", "newKey": "new value", "array": [23423533, "José Arcadio Buendía"], "object": { "innerKey1": "new value", "innerKey2": "23423533", "innerKey3": "José Arcadio Buendía" } }, { "id": "23423534", "name": "Max Sendak", "email": "info@in-and-out-of-weeks.org", "notes": "Keeps rolling his terrible eyes", "country": "US", "created": "1963-04-09", "newKey": "new value", "array": [23423534, "Max Sendak"], "object": { "innerKey1": "new value", "innerKey2": "23423534", "innerKey3": "Max Sendak" } }, { "id": "23423535", "name": "Zaphod Beeblebrox", "email": "captain@heartofgold.com", "notes": "Felt like I was talking to more than one person", "country": null, "created": "1979-10-12", "newKey": "new value", "array": [23423535, "Zaphod Beeblebrox"], "object": { "innerKey1": "new value", "innerKey2": "23423535", "innerKey3": "Zaphod Beeblebrox" } }, { "id": "23423536", "name": "Edmund Pevensie", "email": "edmund@narnia.gov", "notes": "Passionate sailor", "country": "UK", "created": "1950-10-16", "newKey": "new value", "array": [23423536, "Edmund Pevensie"], "object": { "innerKey1": "new value", "innerKey2": "23423536", "innerKey3": "Edmund Pevensie" } } ]

社区
帮助中心
APP 下载
iPhone 下载
© 2015 - ∞ YouQuant 豫ICP备19046564号