title: Unable to get elements within String[][] to be included in a single data structure in Scala
body: <p>What I'm trying here is that by iterating a <code>Array[Array[String]]</code>, so that I can get them in a kind of Map (<code>Bson</code> or <code>Document</code> as it is related to the MongoDB libs).</p>
  
  <pre><code>val document = Document()
    structure
      .map(arr =&gt; Document(arr(0) -&gt; arr(1)))
      .foreach(element =&gt; document ++ element)
    document
  </code></pre>
  
  <p>Whenever that code is executed, none happens to the original <code>document</code> and everything stays the same, meaning that <code>document</code> is still empty.</p>
  
  <p>Should I iterate it out of a lambda function?</p>