Avatar
そういうことすな
7:56 AM
こんなの見つけて、気になって試してたら欲しくなったんだよね。 static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { var destination = [String: String]() for (key, nillableValue) in source { if let value: Any = nillableValue { destination[key] = “\(value)” } } return destination }