xxxxxxxxxx
$('#mySelect2').find(':selected');
xxxxxxxxxx
//get all selected select object
$('#select2Id').find(':selected');
//get all selected value
$("#select2Id").select2("val");
xxxxxxxxxx
$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed
xxxxxxxxxx
$('#mySelect2').val(['1', '2']);
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed