title: Import from csv into mongo collection with something like "group by" beforehand
body: <p>I would like to import a csv file into a mongo collection, however, the data is not exactly as i want it to be inside the collection.</p>
  
  <p>I have the following csv file: (simplified)</p>
  
  <pre><code>city_id, city_name, street_id, street_name    
  1,city1,1,street1
  1,city1,2,street2
  1,city1,3,street3
  1,city1,4,street4
  1,city1,5,street5
  2,city2,1,street1
  2,city2,2,street2
  2,city2,3,street3
  2,city2,4,street4
  2,city2,5,street5
  2,city2,6,street6
  2,city2,7,street7
  </code></pre>
  
  <p>After the import i would want the imported collection to look like this:</p>
  
  <pre><code>    {
          city_id: 1,
          city_name: "city1",
          streets: [
                      {
                       street_id: 1,
                       street_name: street1 
                      },
                      {
                       street_id: 2,
                       street_name: street2 
                      },
                      {
                       street_id: 3,
                       street_name: street3 
                      },
                      {
                       street_id: 4,
                       street_name: street4
                      },
                      {
                       street_id: 5,
                       street_name: street5
                      }
                  ]
      },
      {
          city_id: 2,
          city_name: "city2",
          streets: [
                      {
                       street_id: 1,
                       street_name: street1 
                      },
                      {
                       street_id: 2,
                       street_name: street2 
                      },
                      {
                       street_id: 3,
                       street_name: street3 
                      },
                      {
                       street_id: 4,
                       street_name: street4
                      },
                      {
                       street_id: 5,
                       street_name: street5
                      },
                      {
                       street_id: 6,
                       street_name: street6
                      },
                      {
                       street_id: 7,
                       street_name: street7
                      }
  
                  ]
      }
  </code></pre>
  
  <p>Can this be done in a relatively easy manner?</p>
  
  <p>Thanks for the help!</p>