title: Iterating orver tuples in a databag
body: <p>I have a relation in the following format
  A=(charrarry,{})
  where A is groups of databags. Each databag has some tuples and each tuple has five fields. How can I iterate over the tuples of the databag and also how can I sort each group based on the first tuple field.</p>
  
  <p>Thanks</p>