Dictionary

struct Dictionary<Key, Value> where Key : Hashable

This extension adds some useful functions to Dictionary.

  • Append a Value for a given Key in the Dictionary. If the Key already exist it will be ovrewritten.

    Declaration

    Swift

    public mutating func append(_ value: Value, forKey key: Key)

    Parameters

    value

    Value to be added.

    key

    Key to be added.