title: how to convert map to a list of collection, where map key and value are the fields of that collection?
body: <p>I have a class like </p>
  
  <pre><code>class BN {
  val id: Long
  val score: Option[Double]
  }
  </code></pre>
  
  <p>And a <code>map: Map[Long, Option[Double]]</code> 
   I want to convert map into <code>List[BN]</code>, where <code>id</code> is the key and <code>score</code> is the value.</p>
  
  <p>Is there any easier way to do it other than coding step by step like java? </p>