Skip to main content

$findObjectProperty

This function finds a specific property in an object and returns the property along with its value.

Parameters

ParameterDescription
objectThe object in which the property will be searched.
propertyThe name of the property to find in the object.
formatAn optional parameter to format the output as a JSON string with indentation. Defaults to false.

Example

<AoiClient>.addCommand({
name: "findProperty",
code: `
$findObjectProperty[{ "name": "John", "age": 25, "city": "New York" };age;true]
`,
});