How would I go about using the last item in an array eg. item.product.images
To get the first image I’m using:
{{item.product.images.0.src}}
I’ve tried {{item.product.images.last.src}} without success.
Or is there any way to get the number of items in an array and save this as a variable
Eg. {% assign array_length = item.product.images | length %}
And then use this in the object call
{{item.product.imagesgarray_length].src}}