Contents

nestedContainer(keyedBy:forKey:)

Returns the data stored for the given key as represented in a container keyed by the given key type.

Declaration

func nestedContainer<NestedKey>(keyedBy type: NestedKey.Type, forKey key: KeyedDecodingContainer<K>.Key) throws -> KeyedDecodingContainer<NestedKey> where NestedKey : CodingKey

Parameters

  • type:

    The key type to use for the container.

  • key:

    The key that the nested container is associated with.

Return Value

A keyed decoding container view into self.

Discussion