title: Compare and Print in Lua?
body: <p>I like to compare and print,
  I have parent child relationship, where I have category,group,questions and sub-questions
  Each sub-question is part of a question, each question is part of a group and each group is part of a category.</p>
  
  <p>my problem is that my category name prints on each group, I like to set if they have the same name to category not to print it but to show the next one when needed. </p>
  
  <p>Let me show you what I mean:</p>
  
  <pre><code>a = category
  b = group
  q,e,r =questions
  t = sub-question
  </code></pre>
  
  <hr>
  
  <pre><code>(Category Name) Cat 1
  (Group Name)Group 1 (part of Cat 1)
  (Question Name) Question 1  (part of Group 1)
                  Question 2  (part of Group 1)
                  Question 3  (part of Group 1)
   (Sub question) -Sub-question 1 (part of Question3)
  
   (Group Name)Group 2 (part of Cat 1)
   (Question Name) Question 1  (part of Group 2)
                  Question 2  (part of Group 2)
                  Question 3  (part of Group 2)
   (Sub question) -Sub-question 1 (part of Question3)
  
   (Category Name) Cat 2
   (Group Name)Group 3 (part of Cat 2)
   (Question Name) Question 1  (part of Group 3)
                  Question 2  (part of Group 3)
                  Question 3  (part of Group 3)
   (Sub question) -Sub-question 1 (part of Question3)
  </code></pre>
  
  <hr>
  
  <pre><code>The result is:
   Cat 1
   Group 1
   Question 1
   Question 2
   Question 3
   Sub-question 1
   **Cat 1 *(this is what I like to skip)**
   Group 2
   Question 1
   Question 2
   Question 3
   Sub-question 1
   Cat 2
   Group 3
   Question 1
   Question 2
   Question 3
   Sub-question 1
  </code></pre>
  
  <hr>
  
  <p>If they are from the same Category don`t print it twice or 100 times just once.</p>