.. highlightlang:: us .. _obj_has_key: obj_has_key =========== .. index:: obj_has_key .. us.tag obj_has_key NOTREADYENGLISH New410 obj :ref:`obj_has_key` checks if a given key exists. .. function:: bool = obj_has_key(obj, key) .. us.return **Return Value** *bool* is TRUE (1), if the key exists and otherwise FALSE (0). .. us.params **Parameters** .. uparam:: obj *obj* is the object created with :ref:`obj_create`. .. uparam:: key *key* is a number or a string. .. us.example **Example** :: obj = obj_create() obj[1] = 1 obj[3] = 3 // integer key obj.val = "Test" // String key print obj_has_key(obj, 2) // 0 print obj.has_key(2) // 0 print obj.has_key(1) // 1 print obj.has_key("val") // 1 .. seealso:: :ref:`overview-uniscript-objects`, :ref:`obj_lookup` :sub:`id-1319100`