Skip to main content
Keeps only the entries of an object whose keys also appear in a second object you supply, and drops the rest. The values that are kept come from the input; the supplied data is used only to decide which keys are allowed. Use this to narrow an object down to a known set of fields, for example stripping an incoming product record down to just the handful of attributes your target system expects.

Fields

Sample data

FieldValue
Array{ "color": true, "size": true }
Input:
{ "attributes": { "color": "red", "size": "M", "weight": "200g", "brand": "Acme" } }
Output:
{ "attributes": { "color": "red", "size": "M" } }
Only the color and size keys are allowed, so weight and brand are removed. The kept values come from the input, not from the allowed set.