title: Converting Map[String,Any] to a case class using Shapeless
body: <p>The question <a href="https://stackoverflow.com/questions/31633563/converting-nested-case-classes-to-nested-maps-using-shapeless">here</a> asks about mapping a case class to a Map[String,Any]. I was wondering what would be the other way around, converting Map[String,Any] to a case class. Given the following map:</p>
  
  <pre><code>val mp = Map("name" -&gt; "Tom", "address" -&gt; Map("street" -&gt; "Jefferson st", "zip" -&gt; 10000))
  </code></pre>
  
  <p>Convert it to a case class of <code>Person</code>:</p>
  
  <pre><code>case class Person(name:String, address:Address)
  case class Address(street:String, zip:Int)
  
  val p = Person("Tom", Address("Jefferson st", 10000))
  </code></pre>
  
  <p>with something like this:</p>
  
  <pre><code>val newP = mp.asCC[Person]
  assert(newP.get == p)
  </code></pre>
  
  <p>How should I do that with Shapeless.</p>