title: How to groupby then toList the toMap using java8 stream
body: <p>The original data is like:</p>
  
  <pre><code>[
      { 'k1': 'gbv1', 'k2': 'v2' },
      { 'k1': 'gbv1', 'k2': 'v4' },
  ]
  </code></pre>
  
  <p>The required data is like:</p>
  
  <pre><code>{
      'gbv1': { 'v2': true, 'v4': true },
  }
  </code></pre>
  
  <p>i.e. Group by <code>k1</code> and then Select value of <code>k2</code>.</p>
  
  <p>What I currently have:</p>
  
  <pre><code>examples.stream().collect(
      Collectors.groupingBy(Example::getK1,
          Collectors.mapping(Example::getK2,
                  Collectors.toList())));
  </code></pre>
  
  <p>It returns a list of value of <code>k2</code> not a map;</p>
  
  <p>I'm most of the time with javascript and it's easy to do such kind of work because it's dynamic I think.</p>