title: How to create a scala case class instance with a Map instance
body: <p>I want to create a scala case class whose fields come form a map . And , here is the case class </p>
  
  <pre><code> case class UserFeature(uid: String = null,
                       age: String = null,
                       marriageStatus: String = null,
                       consumptionAbility: String = null,
                       LBS: String = null,
                       interest1: String = null,
                       interest2: String = null,
                       interest3: String = null,
                       interest4: String = null,
                       interest5: String = null,
                       kw1: String = null,
                       kw2: String = null,
                       kw3: String = null,
                       topic1: String = null,
                       topic2: String = null,
                       topic3: String = null,
                       appIdInstall: String = null,
                       appIdAction: String = null,
                       ct: String = null,
                       os: String = null,
                       carrier: String = null,
                       house: String = null
                            )
  </code></pre>
  
  <p>suppose the map instance is</p>
  
  <pre><code>Map("uid" -&gt; "4564131",
      "age" -&gt; "5",
      "ct" -&gt; "bk7755")
  </code></pre>
  
  <p>how can I apply the keys&amp;values of the map to the fields&amp;values of case class?</p>