跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / datatransformation

Pick Field

Pick a specific field from the input data

数据 扩展程序网页应用

此内容尚不支持你的语言。

Keep one field from the incoming data and drop everything else.

Pick Field follows a dot path such as user.name into the incoming data and outputs only the value it finds there. What comes out depends on that value:

  • An object is passed on as it is, so its fields become the new item.
  • A list becomes one item per entry. Entries that are objects are passed on as they are; plain values (text, numbers) are wrapped as { "<name>": value }.
  • A single plain value is wrapped the same way, as { "<name>": value }.

The <name> is Output field name if you set it, otherwise the last part of the path (name for user.name).

  • Pull the useful list out of an API response, for example data.results, so the next nodes work on the results directly.
  • Reduce a big object to the one value you need before a message or a comparison.
  • Turn a list of plain values (such as tags) into separate items you can loop over.
  • To change or remove several fields at once, use Edit Fields instead. To split a list while keeping the other fields, use Split Out.
设置项类型作用
FieldPath (必填)TextThe path to the field to pick from the input object (without the node's name or id).
Output field name TextThe name of the output field to be used in case the target data is an array of non objects (like strings, numbers, etc.).

Write FieldPath as plain field names joined by dots, starting from the incoming data: user.name, not $input.user.name or the node’s name. If the incoming data is a list, start with the position of the item, counting from 0: 0.title reads the title of the first item.

  • Output

For example, with the input { "user": { "name": "Ada", "tags": ["vip", "beta"] } }:

  • user outputs { "name": "Ada", "tags": ["vip", "beta"] }.
  • user.name outputs { "name": "Ada" }.
  • user.tags with Output field name tag outputs two items: { "tag": "vip" } and { "tag": "beta" }.

None. This node needs no connection and has no slots for other nodes.

  1. An Http Request node calls an API that answers { "data": { "results": [ ... ] } }.
  2. Pick Field with FieldPath data.results outputs one item per result.
  3. Limit with Max Items 5 keeps the first five.
  4. A Slack node posts each result’s title with {{ $input.title }}.
  • “Field “…” does not exist in the input object”. One part of the path is missing or misspelled. The message shows the data the node received: compare the names, including upper and lower case. If the data is a list, start the path with an item position such as 0..
  • “No source node is connected to this node.” Pick Field has nothing to read. Connect the node that produces the data to its input.
  • The output field has an unexpected name. Plain values are named after the last part of the path. Set Output field name to choose the name.
  • Edit Fields: add, change or remove several fields.
  • Split Out: turn a list field into separate items.
  • Rename Keys: change field names without dropping data.
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Pick Field”