Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 865 Bytes

getcustomattribute.adoc

File metadata and controls

43 lines (34 loc) · 865 Bytes

GetCustomAttribute()

Important

Deprecated in 3.0.

Please use getCustomAttribute() method of NetObj class instead.

GetCustomAttribute(object, name) => String

Lookup custom attribute of the object.

Alternatively, attributes can be accessed as instance attribues (with ., attribute should exist) or by using attribute@object notion (which will return null instead of runtime error if attribue is missing).

Table 1. Parameters

object

Object to query.

name

Name of the custom attribute.

Return

String value of the custom attribute of null if not found.

Example
>>> GetCustomAttribute($node, "test")
testvalue
>>> $node.test
testvalue
>>> test@$node
testvalue