How do I append one Dictionary to another Dictionary using Swift?
Dictionary
Swift
I am using the AlamoFire library to send a
AlamoFire
func += (lhs: inout [Key: Value], rhs: [Key: Value]) { rhs.forEach{ lhs[$0] = $1 } } var dic1 = ["test1": 1] dic1 += ["test2": 2] dic1 // ["test2": 2, "test1": 1]