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

Input:
Output:
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.