Pick_keys
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Pick_keys

  • Dark
    Light
  • PDF

Returns an object containing the properties of the given object whose keys are found in the given keys list.

Function signature

PICK_KEYS(object: Object, propertyname: Array) => Object
Parameter Description
Object Object whose property will be get
Property name Name of the property to take from object

Examples

animal = {"name":"dog","weight":123,"active":false,"children":0}
Formula Return value
PICK_KEYS({a: "A", b: "B", c: "C"}, ["a", "b"]) {"a":"A","b":"B"}
PICK_KEYS({a: "A", b: "B", c: "C"}, ["w", "q"]) {"a":"A","b":"B","c":"C"}
PICK_KEYS(animal, ["name", "active", "children"]) {"name":"dog","active":false,"children":0}

Was this article helpful?

What's Next