title: Apache Spark - Scala - how to FlatMap (k, {v1,v2,v3,...}) to ((k,v1),(k,v2),(k,v3),...)
body: <p>I got this:</p>
  
  <pre><code>val vector: RDD[(String, Array[String])] = [("a", {v1,v2,..}),("b", {u1,u2,..})]
  </code></pre>
  
  <p>wanna convert to:</p>
  
  <pre><code>RDD[(String, String)] = [("a",v1), ("a",v2), ..., ("b",u1), ("b",u2), ...]
  </code></pre>
  
  <p>Any idea how to do that using <code>flatMap</code>.</p>