How to reference a variant meta object in theme code

I have set up a variant metafield which uses a meta object definition. The meta object has a title, image, and description. How can I reference these in the theme code to display on the product page for each variant?

The variant metafield namespace and key are: custom.product_info_metal

Meta object keys:

Title: product_info_metal.metal_name

Image: product_info_metal.icon

Description: product_info_metal.description

Here is an example product that has the variant metafield set up: https://bybaby.com.au/products/eclipse-diamond-drop-huggie

Thank you for any help!

Hi @BrookeByBaby ,

I wrote two articles that will definitely help you set it up.

You will learn how to access metafield values in Liquid and how to render the variant metafield values on product pages (with JS code included that ensures that when you select a product variant on the product page, the variant metafield shows the information corresponding to the selected product variant).

Hope this helps!