Accessing metaobject field with list of files type

I have a metafield in my page which accepts a metaobject as its input type. In a section referencing this page metaobject I can access the fields which have a single input type no problem using this:

{% assign myMetaobject = page.metafields.custom.example.value %}

This lets me access fields with single or multi line text inputs using myMetaobject.title or myMetaobject.description. But I also have a field which accepts multiple files, specifically image and video. This is where I am struggling to access the files in a loop.

If I try this {{ myMetaobject.images }} it prints:

[“gid://shopify/MediaImage/25857330184378”,“gid://shopify/MediaImage/25863258636474”,“gid://shopify/MediaImage/25863258570938”]

If I try to do a for loop on myMetaobject.images, it doesnt print anything out. Any ideas?

{% for image in myMetaobject.images %}
        

          
          
        

      {% endfor %}

Here is beautify code for you, kindly accept my answer.

Thanks

Hii bro do you know how we can access single image from a file list metafield using index without for loop?

{% assign myMetaobject = page.metafields.custom.example.value %}

use this for single

You can access the fields inside a metaobject in this way:

{% for metaobject in product.metafields.custom.metafield_key_name.value %}
  {% if metaobject.system.type == "metaobject_identifier" %}
    {{ metaobject.title }}
    {{ metaobject.content | metafield_tag }}
  {% endif %}
{% endfor %}