title: Set property by string in Kotlin using reflection?
body: <p>I have an object:</p>
  
  <pre><code>class User {
    var id: String? = null
    var name: String? = null
  }
  </code></pre>
  
  <p>and list of pairs:</p>
  
  <pre><code>val fieldsToChange = listOf&lt;Pair&lt;String, String&gt;&gt;(Pair("name", "foo"), Pair("id", "bar"))
  </code></pre>
  
  <p>I would like to iterate trough list of pairs and set appropriate values for given properties using reflection.</p>