title: Reference member of class by string and/or enum
body: <p>Not sure if I'm asking this question properly or not. But basically I want to reference a member of a class by a string value and/or enum</p>
  
  <p>For example I have the following.</p>
  
  <pre><code>var total:Int = 0
  if locale.currencyCode == "JPY" {
      for item in Cart.items {
          total += item.fabric.price.JPY * item.quantity
      }
  }else{
      for item in Cart.items {
          total += item.fabric.price.USD * item.quantity
      }
  }
  subtotalAmountLabel.text = "\(total.formatMoney())"
  </code></pre>
  
  <p>But, I'd like to write something like the following instead.</p>
  
  <pre><code>var total:Int = 0
  for item in Cart.items {
      total += item.fabric.price[locale.currencyCode]* item.quantity
  }
  subtotalAmountLabel.text = "\(total.formatMoney())"
  </code></pre>
  
  <p>Is there a possible way to do this?</p>