Instance Method

setObject(_:atIndexedSubscript:)

Sets the value’s JavaScript property at the specified index, allowing subscript syntax.

Declaration

func setObject(_ object: Any!, atIndexedSubscript index: Int)

Parameters

object

The value to set at the specified index.

index

An index in the JavaScript object.

Discussion

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

See Also

Accessing Values with Subscript Syntax

func objectAtIndexedSubscript(Int) -> JSValue!

Returns the value’s JavaScript property at the specified index, allowing subscript syntax.

func objectForKeyedSubscript(Any!) -> JSValue!

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

func setObject(Any!, forKeyedSubscript: Any!)

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