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

Omit_keys

  • Dark
    Light
  • PDF

Article Summary

Returns an object containing the properties of the given object, minus the ones found in the given keys list.

Function signature

OMIT_KEYS(object: Object, propertyname: Array) => Object
ParameterDescription
ObjectObject whose property will be get
Property nameName of the property to not take from object

Examples

animal = {"name":"dog","weight":123,"active":false,"children":0}
FormulaReturn value
OMIT_KEYS({a: "A", b: "B", c: "C"}, ["a", "b"]){"c":"C"}
OMIT_KEYS(animal, ["weight"]){"name":"dog","active":false,"children":0}

Was this article helpful?

What's Next