objectForKeyedSubscript(_:)
Returns the value’s JavaScript property named with the specified key, allowing subscript syntax.
Declaration
func objectForKeyedSubscript(_ key: Any!) -> JSValue!Parameters
- key:
The name of a property in the JavaScript object.
Return Value
The value of the named property, or the JavaScript undefined value if no property exists by that name.
Discussion
This method is equivalent to the forProperty(_:) method, but provides Objective-C subscripting support.