title: Stream over a List of Map and collect specific key
body: <p>This is my List:</p>
  
  <pre><code>[
      {name: 'moe', age: 40}, 
      {name: 'larry', age: 50}, 
      {name: 'curly', age: 60}
  ];
  </code></pre>
  
  <p>I want to pluck <code>name</code> values and create another <code>List</code> like this:</p>
  
  <pre><code>["moe", "larry", "curly"]
  </code></pre>
  
  <p>I've written this code and it works:</p>
  
  <pre><code>List&lt;String&gt; newList = new ArrayList&lt;&gt;();
  for(Map&lt;String, Object&gt; entry : list) {
      newList.add((String) entry.get("name"));
  }
  </code></pre>
  
  <p>But how to do it in using <code>stream</code>. I've tried this code which doesn't work.</p>
  
  <pre><code>List&lt;String&gt; newList = list.stream().map(x -&gt; x.get("name")).collect(Collectors.toList());
  </code></pre>