I need to check if an option(arrayItem) already exists in my selectpicker to populate it with :
$("#iselectroledirregional").append('<option value="' + arrayItem + '">' + arrayItem + '</option>').selectpicker('refresh');
I already tried this in an if/else statement:
$("#yourSelect option[value='yourValue']").length > 0;
But it doesn't work because my select dropdown does no contains a value tag :
Thank you