Contents

setObject(_:forKeyedSubscript:)

Sets the value’s JavaScript property named with the specified key, allowing subscript syntax.

Declaration

func setObject(_ object: Any!, forKeyedSubscript key: Any!)

Parameters

  • object:

    The value to set for the named JavaScript property.

  • key:

    The name of a property in the JavaScript object.

Discussion

This method is equivalent to the setValue(_:forProperty:) method, but provides Objective-C subscripting support.

See Also

Accessing Values with Subscript Syntax