I have a dictionary as [String:Any].Now i want to convert this dictionary keys & value as key=value&key=value.I have created below extensio
[String:Any]
key=value&key=value
Try this :
func queryItems(dictionary: [String:Any]) -> String { var components = URLComponents() print(components.url!) components.queryItems = dictionary.map { URLQueryItem(name: $0, value: $1) } return (components.url?.absoluteString)! }