I have created a custom meta field for variants with namespace and key like this custom.variant_images. In the Liquid file, I can access it this way {{variant.metafields.custom.variant_images}}.
But now I want to access it from my JS file. I managed to get a JSON output for a product, but under variants, I can’t find a line for my custom meta field. How can I access it? Some code example is appreciated.