Appearance
Pluck Attribute Mutation ​
The Pluck attribute mutation reads one attribute from every object in a list of objects and returns a plain list with one text per object. To read an attribute from a single object, use Extract attribute instead.
Options ​
- Attribute: The attribute to read. Use dot paths for nested attributes, for example address.city, and [0] to pick an entry of a nested list, for example images[0].url.
An object without the attribute gives an empty entry, so the result always has as many entries as the list has objects. An attribute that holds a nested object or list comes back as compact JSON text.
Example ​
The extra field videos holds this list, parsed with Parse JSON:
json
[
{ "name": "hero.mp4", "url": "https://cdn.example.com/hero.mp4" },
{ "title": "lifestyle.mp4", "url": "https://cdn.example.com/lifestyle.mp4" }
]Pluck attribute with attribute url gives the list https://cdn.example.com/hero.mp4, https://cdn.example.com/lifestyle.mp4. With attribute name it gives hero.mp4 followed by an empty entry, because the second object has no name.