This uses the bootstrap-select plugin and extends it so that you can use a remote source to search.
preprocessData: function (data) {
var offences = [];
data.forEach(function (item) {
offences.push({
value: item.code,
text: item.chargeText
});
});
return offences;
},
})
}