I don''t quite understand your question. In Swift, Dictionaries are structs. You can always use `let dict2 = dict1`. That is enough. Or did you mean below code?
var dict1 = ... var dict2 = ... for (key, value) in dic1 { dic2.updateValue(value, forKey:key) } Zhaoxin On Tue, Aug 30, 2016 at 4:36 AM, Jens Alfke via swift-users < swift-users@swift.org> wrote: > I may be missing something obvious, but I can’t find a library function > that maps a Dictionary to another Dictionary, transforming the keys and/or > values. The only method I’ve found is the regular map(), which results in > an Array. Does this just not exist in the standard library? > > —Jens > _______________________________________________ > swift-users mailing list > swift-users@swift.org > https://lists.swift.org/mailman/listinfo/swift-users >
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users