Extract Field from Array
Pull a single field out of every object in a list, giving you an array of just those values. Supports nested paths like 'user.address'. Missing fields return null.
Logic action Logic
Pull a single field out of every object in a list, giving you an array of just those values. Supports nested paths like 'user.address'. Missing fields return null.
At a Glance
| Field | Value |
|---|---|
| Action ID | pluck |
| Category | Logic |
| Connector | Not required |
| Requires gas | No |
| Funds movement | None declared |
| Tags | logic, pluck, extract, array, transform, control-flow |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
array | array | Yes | Array of objects to extract field from |
field | string | Yes | Field name to extract from each object. Supports nested paths using dot notation (e.g., 'user.address') |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
values | array | Yes | Array of extracted field values |
Examples
json{ "type": "pluck", "payload": { "array": [ { "address": "0x123...", "name": "Wallet 1" }, { "address": "0x456...", "name": "Wallet 2" } ], "field": "address" }, "children": []}
bashcurl -X POST "https://api.b3os.org/v1/actions/pluck/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "array": [ { "address": "0x123...", "name": "Wallet 1" }, { "address": "0x456...", "name": "Wallet 2" } ], "field": "address" }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
