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

Set_key

  • Dark
    Light
  • PDF

Article Summary

Returns an object containing all the properties from the given object, with the given property key set to the given value. Any existing property under the given key is overridden.

Function signature

SET_KEY(object: Object, propertyname: String, value: ) => Object
ParameterDescription
ObjectObject whose property will be set
Property nameName of the property from object to set
ValueAny value

Examples

obj = {"a":"A","b":"B","c":"C"}
animal = {"name":"dog","weight":123,"active":false,"children":0}
FormulaReturn value
SET_KEY(obj, "a", "foo"){"a":"foo","b":"B","c":"C"}
SET_KEY(animal, "weight", 32){"name":"dog","weight":32,"active":false,"children":0}

Was this article helpful?