title: Is it possible to use dynamic variable for a class member variable
body: <p>I have a class like </p>
  
  <pre><code>class Person {
     var address:String
     var number:String
     var houseNo:String
     var licenceNo:String
     ....
  }
  
  
  let jone = Person()
      jone.number = "123456"
  </code></pre>
  
  <p>So in this i need to initialize the variable of person class one by one. And i have approx 30 variables in person class.</p>
  
  <p>Is not there s simple way to do this ?</p>
  
  <p>like I have all the keys coming from backend like "number = 123456". Is not there a way that i run  a for loop and use something like.</p>
  
  <pre><code>for key in keys {
     john."\(key)" = dict[key]
  }
  </code></pre>
  
  <p>Is not there a way to shorten this lengthy procedure ?</p>