How can I correctly extract metafields values in JSON code?

Things are more complex in my case. I am already checking if the required values are in the product:

Then I need to pass exact metafields variables to the Ai prompt here, not just one specific value, to generate a product description based on different parameters Metafield1, Metafield2, Metafield3, and so on:

Each metafield can have many variations, not just one: