title: How to conver dictionary[String:String] to URLQueryItem in swift 5
body: <blockquote>
  <p>I have one parameter dictionary</p>
  </blockquote>
  <pre><code>  func queryItems(dictionary: [String:Any]) -&gt; URLQueryItem {
      var components = URLComponents()
      print(components.url!)
      components.queryItems = dictionary.map {
          URLQueryItem(name: $0, value: ($1 as! URLQueryItem))
      }
     return (components.url?.absoluteString)!
  }
  </code></pre>
  <p>I created one function but its not working</p>