Skip to content

$objectHasProperty

$objectHasProperty checks if a given object contains a specified property and returns true or false.

Usage

$objectHasProperty[objectName;property]

Parameters

FieldTypeDescriptionRequired
objectNamestringThe name of the object to check.true
propertystringThe property name to look for.true

Example(s)

This example creates an object named Name and then checks if it has the property Leref:

1
client.command({
2
name: "objectHasProperty",
3
code: `
4
$objectHasProperty[Name;Leref] $comment[true]
5
6
$createObject[Name;{
7
"Leref": "Ferel",
8
"aoi.js": "dbd.js"
9
}]
10
`
11
});