Skip to main content
Keeps only the items from the incoming array or object whose values also appear in a second set of values you supply, and drops everything else. Use this to filter a list down to an approved set, for example keeping only the tags, categories, or status codes that you actually allow through. The comparison looks at the values themselves, not at where they sit, and the surviving items keep their original keys.

Fields

Sample data

FieldValue
Array{ "a": "sale", "b": "featured", "c": "seasonal" }
Input:
{ "tags": ["sale", "new", "clearance", "featured"] }
Output:
{ "tags": { "0": "sale", "3": "featured" } }
Only sale and featured appear in the allowed set, so the rest are dropped. The two survivors keep their original positions (0 and 3) from the input list.