I\'m using jQuery select2 multi select dropdown. I need to select all options in a dropdown from code. Basically there is a Select All checkbox on which this functionality h
you could do it for one string
$('select.your-select option').attr('selected', true).parent().trigger('change')