Instance MethodJSON
load(_:_:)
Executes the given closure on the array element at the given index for further decoding. Records the index of the element being decoded if the closure throws an error, and propogates it up the call chain.
Available when
Element
isJSON
func load<T>(_ index: Int, _ body: (JSON) throws -> T) throws -> T
Parameters
- index
An index into this array. This index must be within the array’s bounds.
Returns
The result of the closure, if it succeeds.