I'm having trouble using the value inside my variable when I use jquery
var id_pais = $('#endUF option[value=id_pais]').text();
$('#endUF option[value=id_pais]').remove();
$('#endPAIS option[value=id_pais]').prop('selected', true);
In case I get the value of my system and put it in a variable js. But then I can not reuse it in jquery. I've read about it and saw that when I use value in jquery, like the one used above, jquery sees it as a string and does not take the value of the variable.