JSON_GET_FIELD_VALUES
Description
Returns a list containing the value of the specified field from each map in the provided list. Optionally excludes null values from the result.
Syntax
JSON_GET_FIELD_VALUES(json_array, field_name, exclude_nulls) -> List<ANY>
Parameters
| Parameter | Data Type | Required | Description |
|---|---|---|---|
| json_array | List<Map<String, ANY>> | Yes | The list of maps to extract values from. |
| field_name | String | Yes | The name of the field whose value is extracted from each map. |
| exclude_nulls | Boolean | Yes | If TRUE, maps whose field value is null or missing are omitted from the result. If FALSE, their values are included as null. |
Examples
JSON_GET_FIELD_VALUES(VLOOKUP_ALL("Account", "Name, Industry, Phone", "OwnerId", OwnerId), "Name", true)
-- Returns the Name from every matching Account, e.g. (Acme, Global).JSON_GET_FIELD_VALUES(VLOOKUP_ALL("Account", "Name, Industry, Phone", "OwnerId", OwnerId), "Phone", false)
-- Returns the Phone from every matching Account, keeping nulls, e.g. (null, (123)456-7890).