Im trying to introduce the Array of Strings shown below into a Selectpicker so the options of the selectpicker would be the elements of the array.
<script>
String str[] = (String[]) request.getAttribute("intervenciones");
for (var i=0;i<str.length;i++){
option += '<option value="'+ str[i] + '">' + str[i] + '</option>';
}
$('#procedimiento').append(option);
</script>
<div class="row top-buffer">
<div class="col-sm-4">
<label for="procedimiento">Procedimiento</label>
<select name="procedimiento" id="procedimiento" class="form-control selectpicker" data-show-subtext="true" data-live-search="true" data-size="3" style="width: 100px;">
</select>
</div>