Dictionary
struct Dictionary<Key, Value> : Collection, ExpressibleByDictionaryLiteral where Key : Hashable
-
Returns a
Dictionarycontaining the results of transforming the keys overselfwhere the returned values are the mapped keys.Declaration
Swift
public func mapKeys<T: Hashable>(_ transform: (Key) -> T) -> [T: Value]Parameters
transformThe 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
View on GitHub
Dictionary Extension Reference