How to create a global variable where the response contains duplicate tags?

Hi all,

I’m trying to create a global variable based on the response of a POST request. However, the response contains duplicate XML tags - which makes it difficult to assert.
Like so:

<Field>
   <Name>Field 1</Name>
   <Value>ABC</Value>
</Field>
<Field>
   <Name>Field 2</Name>
   <Value>123</Value>
</Field>

How can I assign the value of 123 to a global variable?

Once you transform this XML response to JavaScript, you could search for the field with the name “Field 2” and identify the value. Would this work for you?