title: Displaying the City and State using GMSAutocomplete - Swift
body: <p>I have a GMSAutocompleteViewController that presents after a button is pressed. Heres the code:</p>
  
  <pre><code> let autocompleteController = GMSAutocompleteViewController()
      autocompleteController.delegate = self
  
      let fields: GMSPlaceField = GMSPlaceField(rawValue: UInt(GMSPlaceField.name.rawValue) |
          UInt(GMSPlaceField.placeID.rawValue))!
      autocompleteController.placeFields = fields
  
      let filter = GMSAutocompleteFilter()
      filter.type = .geocode
      filter.country = "US"
      autocompleteController.autocompleteFilter = filter
  
      present(autocompleteController, animated: true, completion: nil)
  </code></pre>
  
  <p>The results from the view controller look like this when a user is searching:</p>
  
  <p><a href="https://i.stack.imgur.com/dtGsk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dtGsk.png" alt="enter image description here"></a></p>
  
  <p>and using this code, I can return the name of the place, as well as the formatted address and attributions:</p>
  
  <pre><code>func viewController(_ viewController: GMSAutocompleteViewController, didAutocompleteWith place: GMSPlace) {
      print("Place name: \(place.name)")
      print("Formatted address: \(place.formattedAddress)")
      print("Place attributions: \(place.attributions)")
      dismiss(animated: true, completion: nil)
  }
  </code></pre>
  
  <p>Prints out->
  Place Name: Tremosine
  Formatted address: nil
  Place attributions: nil</p>
  
  <p><strong>What I want to return is the second line in the screenshot that says "Province of Brescia, Italy" so that I can store it on my backend. Any idea on how to get that text?</strong></p>