Hi, tell me how to get a variable product cost when I click the button

I made a form for the page, the page has attributes that I need to pass to the global variable axure rp
by attributes, there is an array $(‘form.variations_form’). attr(‘data-product_variations’) and a variable [‘display_price’]
Question, how do I pass a variable from a page to the axure 'example_price’global variable.
I do this, but the value is passed as text
Open Link:
javascript:
var getCurrentPrice = function(){
var variants = JSON.parse($(‘form.variations_form’).attr(‘data-product_variations’)), currImage = $(‘form.variations_form’).attr(‘current-image’);
for(i in variants){
if(variants[i][‘image_id’] == parseInt(currImage)){
return variants[i][‘display_price’];
}
}}

Next:
Set variable value
price_product
value
getCurrentPrice();

Then:
Set text price-block to price_product
test.rp (45.1 KB)