Answers.Body: <p>I wasn't able to understand how to apply your suggestions and went with this route:</p>
  
  <pre><code>{% for coupon in craft.entries.section('coupons').limit('30').status('live').order('postDate asc') %}
      {% set image = coupon.contentBuilder.type('image').first() %}
         {# multiple times for each of the required fields #}
         {# here comes some other code related to field's value manipulations #}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-23T22:01:54.123Z
Answers.LastActivityDate: 2015-10-23T22:01:54.123Z
Answers.UserDisplayName: Mark H.
Answers.Body: <p>You'll have to build a list of the data and then display it.</p>
  
  <pre><code>{% set arr = [] %}
  
  {% for coupon in craft.entries.section('coupons').status('live').order('postDate asc') %}
      {% for content in coupon.contentBuilder %}
          {% set arr = arr|merge([content.myUniqueFieldName: content]) %}
      {% endfor %}
  {% endfor %}
  
  {% for item in arr %}
      {{ item.title }}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-22T16:17:30.837Z
Answers.Text: Hey, it shows me this error - A hash key must be followed by a colon (:). Unexpected token "punctuation" of value "." ("punctuation" expected with value ":")   Also would you please explain this line - content.myUniqueFieldName: content   I'd like to get all the fields from matrix not just a single one. Should I ignore myUniqueFieldName ?
Answers.UserDisplayName: Mark H.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-24T08:56:37.047Z
Answers.Text: Sorry, I fixed my code (I quickly bashed it out the other day while at work). I see you solved your problem anyway, well done.
Answers.UserDisplayName: Rick
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-22T01:05:42.743Z
Answers.LastActivityDate: 2015-10-24T08:55:58.843Z
Answers.LastEditDate: 2015-10-24T08:55:58.843Z
Answers.UserDisplayName: Rick
Body: <p>I'm trying to list some entries from specific channel and get the access to matrix fields. The problem is that some of the entries are listed twice or even often. How do I remove the duplicates?</p>
  
  <pre><code>    {% for coupon in craft.entries.section('coupons').status('live').order('postDate asc') %}
          {% for content in coupon.contentBuilder %}
          {% endfor %}
      {% endfor %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-22T07:25:19.400Z
Comments.Text: The loop through `craft.entries.section('coupons')` should not list entries multiple times!
Comments.UserDisplayName: carlcs
Tags: <matrix>
Title: List Entries and Matrix
ThreadText: # List Entries and Matrix
  
  (Asked by: username_0 on 2015-10-21)
  
  I'm trying to list some entries from specific channel and get the access to matrix fields. The problem is that some of the entries are listed twice or even often. How do I remove the duplicates?
  
  ```
      {% for coupon in craft.entries.section('coupons').status('live').order('postDate asc') %}
          {% for content in coupon.contentBuilder %}
          {% endfor %}
      {% endfor %}
  
  ```
  
  **Tags:** matrix
  
  > **Comments:**
  > **username_1**: The loop through `craft.entries.section('coupons')` should not list entries multiple times!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-10-23. Score: 1
  
  I wasn't able to understand how to apply your suggestions and went with this route:
  
  ```
  {% for coupon in craft.entries.section('coupons').limit('30').status('live').order('postDate asc') %}
      {% set image = coupon.contentBuilder.type('image').first() %}
         {# multiple times for each of the required fields #}
         {# here comes some other code related to field's value manipulations #}
  {% endfor %}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2015-10-22. Score: 1
  
  You'll have to build a list of the data and then display it.
  
  ```
  {% set arr = [] %}
  
  {% for coupon in craft.entries.section('coupons').status('live').order('postDate asc') %}
      {% for content in coupon.contentBuilder %}
          {% set arr = arr|merge([content.myUniqueFieldName: content]) %}
      {% endfor %}
  {% endfor %}
  
  {% for item in arr %}
      {{ item.title }}
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_0**: Hey, it shows me this error - A hash key must be followed by a colon (:). Unexpected token "punctuation" of value "." ("punctuation" expected with value ":")   Also would you please explain this line - content.myUniqueFieldName: content   I'd like to get all the fields from matrix not just a single one. Should I ignore myUniqueFieldName ?  
  > **username_2**: Sorry, I fixed my code (I quickly bashed it out the other day while at work). I see you solved your problem anyway, well done.  
  
  ---
  
  