Hello friends this is my code:
First Second
Above solutions did not work for me with latest select2 (4.0.13)
With jQuery you can use this solution to retrieve value according to documentation: https://select2.org/programmatic-control/retrieving-selections
$('#first').find(':selected').val();