Edit this page

up.util up.util.pick(object, keys)
JavaScript function

Returns a copy of the given object that only contains the given keys.

Example

let object = { foo: 1, bar: 2, baz: 3 }
up.util.pick(object, ['foo', 'baz']) // result: { foo:1, baz: 3 }

Parameters

object
required
keys
required

Return value