Utilizing the "Workflows" card List Pluck enables the extraction of all the values associated with a specific key.
- Workflows
- List Pluck
Given a list of objects, each containing multiple key-value pairings, the List Pluck card can be utilized to extract all the values corresponding to a specific key.
For instance, consider the following example list:
[
{
"firstName": "John",
"lastName": "Smith"
},
{
"firstName": "Mary",
"lastName": "Hopekings"
},
{
"firstName": "Shawn",
"lastName": "Azra"
}
]
To obtain a list comprised of all the first names, simply employ the List Pluck card with the key parameter set to firstName.
Please ensure to fill in the appropriate key in the card's field to retrieve the desired result:
["John", "Mary", "Shawn"]
