逻辑操作 逻辑

仅保留列表中匹配您条件的项目。支持 AND/OR 逻辑,以及等于、大于和成员检查等比较操作。

概览

字段
操作 IDfilter
类别逻辑
连接器不需要
需要 gas
资金移动未声明
标签logic, filter, array, query, control-flow

Payload 模式

字段类型必需描述
arrayarray要过滤的对象数组
filterobject包含字段条件的带有 $and 或 $or 逻辑运算符的过滤 DSL。支持 $eq、$ne、$gt、$gte、$lt、$lte、$in、$nin 运算符。

结果模式

字段类型必需描述
filteredarray匹配过滤器的过滤后数组项目

示例

json
{ "type": "filter", "payload": { "array": [ { "id": "1", "amount": 1500, "status": "active" }, { "id": "2", "amount": 50, "status": "pending" } ], "filter": { "$and": [ { "status": { "$eq": "active" } }, { "amount": { "$gte": 1000 } } ] } }, "children": []}

负载字段可以使用工作流表达式,例如 {{$trigger.body.amount}}{{$nodes.fetch.result.price}}{{$props.asset}},当值应来自触发器、先前节点或可重用工作流属性时。

Ask a question... ⌘I