Limit metafield results to only latest value

I’m updating an order metafield from product metafields…

this code works - however it returns all the old metafield values and not just the current value

{% for lineItems_item in order.lineItems %}
{% for metafields_item in lineItems_item.product.metafields %}
{% if metafields_item.key == 'eta' %}
 {{lineItems_item.name}} - {{metafields_item.value}}, 
{% endif %}
{% endfor %}
{% endfor %}

how do i return just the current metafield value of each product? (instead of listing all the values the field has ever had)

That question doesn’t make sense as it doesn’t output prior values. It could be outputting another variable if you have another metafield with a key of “eta” (in a different namespace). Or it could be that your value is actually a list

Then how do you suggest it managed to end up with 4 results on an order with only 2 items, clearly listing 2 different results for each item? And the ‘Arriving late December’ bit an old value for the item?

ok - i found it - there is an old metafield with no definition with an eta key - it must have come from there i guess - how can i delete the old metafield? i dont see a delete button on it?

If you check for the namespace too in the condition you don’t need to
delete.