节点类型 browser_processJson
按选定方式转换 JSON 或提取其中的数据。

截图来自 MoreLogin 桌面客户端 V2.73.101 的英文界面。
以下字段位于 data.browserUi.inputs。
| 字段 | 类型或取值 | Schema 必填 | 执行默认值 | 说明与边界 |
|---|---|---|---|---|
source | ["null","boolean","number","string"] / array<JSON> / object(支持变量引用) | 否 | — | 输入 JSON |
dataType | ["null","boolean","number","string"] / array<JSON> / object(支持变量引用) | 否 | — | 数据类型 |
processingMode | "display" / "organize" / "combine"(支持变量引用) | 是 | — | 处理方式 |
mergeSources | ["null","boolean","number","string"] / array<JSON> / object(支持变量引用) | 否 | — | 合并数据 编辑器初值 ["",""] |
fieldMappings | array<object>(支持变量引用) | 否 | — | 目标字段 编辑器初值 [{"key":"","from":"field","path":"","value":""}] |
conflictPolicy | "first" / "last" / string / null | 否 | — | 同名字段处理 |
showList | boolean(支持变量引用) | 否 | true | 显示列表 编辑器初值 true |
singleResult | "first" / "random"(支持变量引用) | 否 | "first" | 选取结果 编辑器初值 "first" |
dedupeEnabled | boolean(支持变量引用) | 否 | false | 去重 编辑器初值 false |
dedupeBy | "whole" / "field"(支持变量引用) | 否 | "whole" | 去重方式 编辑器初值 "whole" |
outputDedupeField | string | 否 | — | 去重字段路径 |
sortEnabled | boolean(支持变量引用) | 否 | false | 排序 编辑器初值 false |
sortBy | "field"(支持变量引用) | 否 | "field" | 排序依据 编辑器初值 "field" |
outputSortField | string | 否 | — | 排序字段路径 |
sortDirection | "asc" / "desc" / string / null | 否 | — | 排序方向 |
resultPreview | ["null","boolean","number","string"] / array<JSON> / object(支持变量引用) | 否 | — | 结果预览 |
- processingMode(必填,无默认值)=display/organize/combine:fieldMappings 按目标字段及来源路径重构;mergeSources 合并同类型对象/数组,conflictPolicy 指定同名字段策略;列表可去重、排序、选第一项/随机项。JSON 内引用保留类型并正确转义;缺失 JSON 引用替换空串。
- 校验错误码
RPA_NODE_INPUT_INVALID - 必填
processingMode - 编辑器必填项,没有默认值;省略时写入与校验返回 RPA_NODE_INPUT_INVALID(reason=required),运行前同样拒绝。
- 校验错误码
RPA_NODE_INPUT_INVALID
| 字段 | 允许的形式 |
|---|---|
source | literal, template |
dataType | literal, template |
processingMode | literal, template |
mergeSources | literal, template |
fieldMappings | literal, template |
conflictPolicy | literal, template |
showList | literal, template |
singleResult | literal, template |
dedupeEnabled | literal, template |
dedupeBy | literal, template |
outputDedupeField | literal, template |
sortEnabled | literal, template |
sortBy | literal, template |
outputSortField | literal, template |
sortDirection | literal, template |
resultPreview | literal, template |
| 输出字段 | 类型或取值 |
|---|---|
value | ["null","boolean","number","string"] / array<JSON> / object |
count | number |
index | number |
按契约用 ${nodeId.data.field} 引用公开字段。
可放入流程 nodes 数组或其他节点 blocks 中的完整节点对象。
{
"id": "pick_names",
"type": "browser_processJson",
"data": {
"title": "保留商品名称并添加币种",
"browserAction": "processJson",
"browserUi": {
"inputs": {
"source": [
{
"name": "Desk",
"price": 120
},
{
"name": "Chair",
"price": 45
}
],
"processingMode": "organize",
"fieldMappings": [
{
"key": "product",
"from": "field",
"path": "name"
},
{
"key": "currency",
"from": "fixed",
"value": "USD"
}
]
},
"exception": {
"timeout": 30000,
"policy": "interrupt"
}
}
}
}