How to substitute string name from a struct with its corresponding image name?
<p>I have a struct to store name and image names of pictures which are already bundled in app as follows</p>

<pre><code>struct City { var name: String
              var imageName: String }

class firstViewController: UIViewController

let cities = [City(name:"City00", imageName:"city_00"),
              City(name:"City01", imageName:"city_01"),
              City(name:"City02", imageName:"city_02")]
</code></pre>

<p>In displayViewController, I have a variable <code>nowCityImages</code> to store data selected from firstViewcontroller</p>

<pre><code>class displayViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, NSFetchedResultsControllerDelegate {

var nowCityImages: [String] = []
</code></pre>

<p>Now I want to display image of city in tableview</p>

<pre><code>public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
{
    let myCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! CityCell

    let outCityImages = nowCityImages[indexPath.item]

    // This is not displaying any images
     myCell.cityImage.image = UIImage(named:outCityImages)

   return myCell
}
</code></pre>

<p>If I use  <code>print(outCityImages)</code>, I am getting following output as excepted</p>

<pre><code>City00
City02
</code></pre>

<p>but I don't know how to replace <code>City00 with city_00</code> and <code>City02 with city_02</code> in tableview cell so that it displays the image.</p>