title: How to extract keys from map?
body: <p>How do I extract all keys from a <code>map</code> field?<br>
  I have a bag of tuples where one of the fields is a map that contains HTTP headers (and their values). I want to create a set of all possible keys (in my dataset) for a HTTP header and count how many times I've seen them.</p>
  
  <p>Ideally, something like:  </p>
  
  <pre><code>A = LOAD ...
  B = FOREACH A GENERATE KEYS(http_headers)
  C = GROUP FLATTEN(B) BY $0
  D = FOREACH C GENERATE group, COUNT($0)
  </code></pre>
  
  <p>(didn't test it but it illustrates the idea..)</p>
  
  <p>How do I do something like this? If I can extract a <code>bag</code> of keys from a <code>map</code> it would actually solve it. I just couldn't find any function like this in piglatin's documentation.</p>