title: convert list of map to map using flatMap
body: <p>How I can merge <code>List&lt;Map&lt;String,String&gt;&gt;</code> to <code>Map&lt;String,String&gt;</code> using <code>flatMap</code>?</p>
  
  <p>Here's what I've tried:</p>
  
  <pre><code>final Map&lt;String, String&gt; result = response
      .stream()
      .collect(Collectors.toMap(
          s -&gt; (String) s.get("key"),
          s -&gt; (String) s.get("value")));
  result
      .entrySet()
      .forEach(e -&gt; System.out.println(e.getKey() + " -&gt; " + e.getValue()));
  </code></pre>
  
  <p>This does not work.</p>