Displaying cart attributes in packing slip

I’m trying to display the cart attributes in the packing slip of an order. I read the documentation. I edited the packing slip template accordingly and tried a few different things.

The order.attributes object:

{% for order_attribute in order.attributes %}
    <div>
      {{ order_attribute|first }}: {{ order_attribute|last }}
    </div>
  {% endfor %}

The cart.attributes object:

{% for cart_attribute in cart.attributes %}
    <div>
      {{ cart_attribute|first }}: {{ cart_attribute|last }}
    </div>
  {% endfor %}

And just the attributes object:

{% for attribute in attributes %}
    <div>
      {{ attribute|first }}: {{ attribute|last }}
    </div>
  {% endfor %}

None of those approaches seem to be working (when I generate a packing slip that has attributes).

What else could I try?

{% for attribute in attributes %}
    

      {{ attribute|first }}: {{ attribute|last }}
    

  {% endfor %}

It should work, provided you have cart attributes are going to order properly
Thanks!

If you want to show only particular attribute then you can use it like this

{{ attributes["Your cart attribute"] }}

I hope the above is useful to you.
Thanks!

Thanks for replying. Unfortunately, I have tried that approach already. Could you elaborate what you mean by “provided you have cart attributes are going to order properly?” Is there something specific I should be doing?