Dawn - Split text between accordions on Product page

Hi everyone thank you so much for checking in.

Theme Preview: https://dpgjcitvo31i7nl4-58248331452.shopifypreview.com

On my product pages, I would like:

Description Part 1

Accordion 1 (Contains Ingredients)

Accordion 2 (Contains Nutritional Table).

I am very close to getting this, and have been able to put just the Nutritional Table in an Accordion via <—split—> code.

How do I amend this code to include the 2nd Accordion (Ingredients) via the split method? I have already got the split tags in the product descriptions that I need.

I have Split First and Split Last code - but is there a way to do Split First, Split 2nd, Split 3rd etc?

main-product.liquid:

{%- if product.metafields.my_fields.collapsible_description == true -%}
  {%- if product.description contains '' -%}
    
      {{ product.description | split: '' | first }}
    

    
      
    

	{%- else -%}
    
      
    

	{%- endif -%}
{%- else -%}
  
    {{ product.description }}
  

{%- endif -%}

Product description code so you can see where I have put splits:


**Organic | Vegan | Palm-oil Free | Refined Sugar Free**

65% CACAO

Dressed to impress in a cacao powder tuxedo! These chocolate almonds aren't just snack goals; they're award-winning deliciousness! Nourish your cravings and savour the greatness – because snacks this good deserve a standing ovation!
Awards: Nourish, Great Taste

 **almonds** (32%), coconut blossom sugar, raw cacao mass, cacao butter, raw lucuma, cacao powder, vanilla. Cacao solids min: 65%.

For allergens see ingredients in **bold**.

**MAY CONTAIN NUTS. STORE IN A COOL DARK PLACE, 18°C. GLUTEN FREE**

Packaging is **home compostable | biodegradable | recyclable**

| Nutritional values per | 100g | 25g |
| - | - | - |
| ENERGY (kJ) | 2,421 | 605 |
| ENERGY (kcal) | 580 | 145 |
| FAT (g) | 44.4 | 11.1 |
| SATURATES (g) | 19.1 | 4.8 |
| CARBOHYDRATE (g) | 31.8 | 8.0 |
| of which SUGARS (g) | 23.4 | 5.9 |
| DIETARY FIBRE (g) | 10.6 | 2.7 |
| PROTEIN (g) | 10.2 | 2.6 |
| SALT (g) | 0.18 | 0.05 |

Yes, of course. See example:

{% capture description %}
first

second

third
{% endcature %}

{% assign parts = description | split: "" %}

{{ parts.first }}
  first
{{ parts[0] }}
  first
{{ parts[1] }}
  second

{% for part in parts %}
  {{ forloop.index0 }}: {{ part }}
{% endfor %}
  0: first
  1: second
  2: third

{% if parts.size > 1 %}
  {% for part in parts %}
    {% unless forloop.first %}
      {{ part }}
    {% endunless %}
  {% endfor %}
{% endif %}
  second
  third

In your case I would be thinking about how you can be flexible with collapsible titles or every product will have the same set of collapsibles?