title: Java 8: Convert 2 Lists into List of Map
body: <p>What I have: (2 lists)</p>
  
  <pre><code>List&lt;String&gt; keys = Arrays.asList("1", "2", "3");
  List&lt;String[]&gt; values = Arrays.asList("a,aa,aaa".split(","), "b,bb,bbb".split(","));
  </code></pre>
  
  <p>What I'm trying to get: (list of map)</p>
  
  <pre><code>[
      {"1": "a", "2": "aa", "3": "aaa"},
      {"1": "b", "2": "bb", "3": "bbb"}
  ]
  </code></pre>
  
  <p>Java 7 Solution:</p>
  
  <pre><code>List&lt;Map&lt;String,String&gt;&gt; list = new LinkedList&lt;Map&lt;String,String&gt;&gt;();
  for(String[] vs: values) {
      Map&lt;String, String&gt; map = new LinkedHashMap&lt;String, String&gt;();
      for(int i = 0; i &lt; keys.size(); i++) {
          map.put(keys.get(i), vs[i]);
      }
      list.add(map);
  }
  </code></pre>
  
  <p>I'm learning Java 8 and steam. I wonder if it's possible to do it cleaner.</p>