I have an object literal with a list of countries with two values, price and name:

When the select changes I store the values of the current selected country:

And I store this value in the variable inner function .change():
current_country = $('#country').val();
I accessed this way the object literal for example countries_list.deu
But when I use my current_country Variable console shows me what undefined:
 console.log(countries_list.current_country);
How I can fix this?
 
     
     
    