Dictionary

struct Dictionary<Key, Value> : Collection, ExpressibleByDictionaryLiteral where Key : Hashable
  • Returns a Dictionary containing the results of transforming the keys over self where the returned values are the mapped keys.

    Declaration

    Swift

    public func mapKeys<T: Hashable>(_ transform: (Key) -> T) -> [T: Value]

    Parameters

    transform

    The function used to transform the input keys into the output key

    Return Value

    A dictionary of key/value pairs.

  • Declaration

    Swift

    public func jsonObject() -> Any