Instance Method

objectAtIndexedSubscript(_:)

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

Declaration

func objectAtIndexedSubscript(_ index: Int) -> JSValue!

Parameters

index

An index in the JavaScript object.

Return Value

The value at the specified index, or the JavaScript undefined value if no property exists at that index.

Discussion

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

See Also

Accessing Values with Subscript Syntax

func setObject(Any!, atIndexedSubscript: Int)

Sets 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: (NSCopying & NSObjectProtocol)!)

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