Answers.Body: <p>You can also loop through each object within the <code>options</code> array using:</p>
  
  <pre><code>{% for key, value in item.options %}
    {{ key }} - {{ value }}
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-13T10:31:08.620Z
Answers.LastActivityDate: 2016-06-13T10:31:08.620Z
Answers.UserDisplayName: Luke Pearce
Answers.Body: <p>Answer is the example code for the cart:</p>
  
  <pre><code>{{ item.options.giftWrapped }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-13T10:22:55.867Z
Answers.LastActivityDate: 2016-06-13T10:22:55.867Z
Answers.UserDisplayName: Dan Lee
Body: <p>In the cart example code the selected options are displayed in an unformatted list like so:</p>
  
  <pre><code>{{ item.options|json_encode }}
  </code></pre>
  
  <p>I noticed that the note field text could be outputted individually like so:</p>
  
  <pre><code>{{ item.note }}
  </code></pre>
  
  <p>I'm looking to do the same for the select fields on my product, so if I had a list of options like the gift wrap example, how would I then output the result individually (so that I can format how I like)?</p>
  
  <pre><code>&lt;select name="options[giftWrapped]"&gt;
    &lt;option value="no"&gt;No gift wrap.&lt;/option&gt;
    &lt;option value="yes"&gt;Gift wrapped.&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
Tags: <plugin-craftcommerce>
Title: Craft Commerce: Displaying Individual Product Options in the Cart?
ThreadText: # Craft Commerce: Displaying Individual Product Options in the Cart?
  
  (Asked by: username_0 on 2016-06-13)
  
  In the cart example code the selected options are displayed in an unformatted list like so:
  
  ```
  {{ item.options|json_encode }}
  
  ```
  
  I noticed that the note field text could be outputted individually like so:
  
  ```
  {{ item.note }}
  
  ```
  
  I'm looking to do the same for the select fields on my product, so if I had a list of options like the gift wrap example, how would I then output the result individually (so that I can format how I like)?
  
  ```
  <select name="options[giftWrapped]">
    <option value="no">No gift wrap.</option>
    <option value="yes">Gift wrapped.</option>
  </select>
  
  ```
  
  **Tags:** plugin-craftcommerce
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2016-06-13. Score: 6 | Accepted answer
  
  Answer is the example code for the cart:
  
  ```
  {{ item.options.giftWrapped }}
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2016-06-13. Score: 5
  
  You can also loop through each object within the `options` array using:
  
  ```
  {% for key, value in item.options %}
    {{ key }} - {{ value }}
  {% endfor %}
  
  ```
  
  
  ---
  
  