How can I show a list of product options as checkboxes in the cart? In my cart (Craft3/Commerce2), I need to show a line item's possible options from a checkbox field called "productOptions", and allow the user to select the desired options.

Based on the Craft Docs, I can manually test if an item.options exists, but this means hard-coding the list of possible options(35+) into the cart, and keeping that updated as available options change:

&lt;form method="POST"&gt;
    &lt;input type="hidden" name="action" value="commerce/cart/update-line-item"&gt;
    {{ redirectInput('cart') }}
    {{ csrfInput() }}
    &lt;input type="hidden" name="lineItemId" value="{{ item.id }}"&gt;
    &lt;span {% if item.getFirstError('qty') %}class="has-error"{% endif %}&gt;
    &lt;input type="number" name="qty" min="1" value="{{ item.qty }}"&gt;&lt;/span&gt;


{#  Manual List of Options to Test if Exists #}
    {% if item.options.optionOne is defined %}
        &lt;label class="checkbox"&gt;
            &lt;input type="checkbox" name="options[optionOne]" checked&gt; Option One 
        &lt;/label&gt;
    {% endif %}
    {% if item.options.optionTwo is defined %}
        &lt;label class="checkbox"&gt;
            &lt;input type="checkbox" name="options[optionTwo]" checked&gt; Option Two 
        &lt;/label&gt;
    {% endif %}
            ...                     


OR, I can output the list of product options available for a given product, and use that to update the cart:            

{#  To access the product options, set a variable "product" #}
    {% set product = item.purchasable.product %}
    {% for key, value in product.productOptions %}

        &lt;label class="checkbox"&gt;
{#          &lt;input type="hidden" name="options[{{ value }}]" value=""&gt; #}&lt;!-- uncheck it if not checked --&gt;
            &lt;input type="checkbox"  name="options[{{ value }}]" value="on" 
            {% if item.options.value is defined %}checked{% endif %}&gt; {{ value }} 
        &lt;/label&gt;

    {% endfor %}

    &lt;input type="submit" class="button" value="Update"/&gt;
&lt;/form&gt;


But I can't seem to figure out how to test if the checkbox is selected/value =="on" from the cart array. I know that 
{% if item.options.value is defined %}checked{% endif %}
is not the correct way to access this value if it even can be accessed in this for loop. 

Help? Many thanks in advance!
{% if item.options.value is defined and item.options.value == 'on' %}