//
//  Dictionary+GM.swift
//  Gengmei
//
//  Created by Thierry on 16/6/15.
//  Copyright © 2016年 更美互动信息科技有限公司. All rights reserved.
//

import Foundation
public extension Dictionary {
    func merge(_ dict: Dictionary) -> Dictionary {
        var mutableCopy = self
        for (key, value) in dict {
            // If both dictionaries have a value for same key, the value of the other dictionary is used.
            mutableCopy[key] = value
        }
        return mutableCopy
    }
}
