Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert a dictionary’s keys from NSAttributedStringKey to String
extension Dictionary where Key == NSAttributedStringKey {
var withStringKeys: [String: Value] {
return reduce(into: [:], {
$0[$1.key.rawValue] = $1.value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.