bmel:json-pick¶
Category: JSON · Returns: bmel:string
bmel:json-pick(object: bmel:any, keys: bmel:array)
Description¶
Returns a new JSON string containing only the specified top-level keys from the input object. Keys not present are silently ignored. Supports dot-notation keys for nested picks.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
object | bmel:any | ✅ | The source JSON object or string to pick from. |
keys | bmel:array | ✅ | Array of key names (strings) to include in the output. |
Example¶
bmel:json-pick({chat:Response Payload}.$.payload, ["model", "usage", "id"])