What would you want to filter on?
Note that you can filter using an expression to filter and map the raw items as you see fit:
items = $context.response.data.items
exclusions = ["Motion Elliot"]
filteredItems = filter(items, not(contains(exclusions, item.name)))
join(map(filteredItems, item.name), ", ")
Or if you’re curious what that looks like with some sample data as a reference:
Example with Sample Data (tap to expand)
You could copy and paste this content into an expression block within a rule and run it to see the result. Sometimes it’s helpful to use test data like this to refine your expression.
items = [
{
"deviceId": "1XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"name": "Motion Elliot",
},
{
"deviceId": "2XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"name": "Aeon Multisensor",
},
{
"deviceId": "3XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"name": "Simulated Offline",
},
{
"deviceId": "4XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"name": "Front Door",
}
]
exclusions = ["Motion Elliot"]
filteredItems = filter(items, not(contains(exclusions, item.name)))
join(map(filteredItems, item.name), ", ")