HAS
Returns true if the object or reference has a value with the specified key.
Syntax
=HAS(obj, key)
Arguments
Argument | Type | Description |
---|---|---|
obj | Any | The object or reference to test |
key | String | The key to look for |
Examples
=HAS(OBJECT("A", 1, "B", 2), "A")
→true
Tests whether an object with the key-value pairs "A" => 1, "B" => 2 has the key "A"
=HAS(OBJECT("A", 1, "B", 2), "C")
→false
Tests whether an object with the key-value pairs "A" => 1, "B" => 2 has the key "C"
=HAS(this, "Property 1)
→true
Tests whether the current shape has a property named "Property 1".
=HAS(this, "Property 2)
→false
Tests whether the current shape has a property named "Property 2".
Updated 10 months ago