title: Filtering a grouped value in Pig
body: <p>I have a relation which is being grouped. How can i access the grouped value like a map ? </p>
  
  <pre><code>data = load 'log.txt' as (id:chararray,name:chararray);
  grouped = group data by id;
  foreach data {
  filtered = filter group by group.id=data.id;
  };
  </code></pre>
  
  <p>one way I was trying to iterate the group and filter the resultant bag. But my scenario is I have to iterate an outer tuple and then with those result have to get the corresponding bag from the grouped value. I tried nested foreach but I am getting the below exception,</p>
  
  <pre><code> expression is not a project expression: (Name: ScalarExpression) Type: null Uid: null)
  </code></pre>
  
  <p>tried several combinations of no use.</p>