http://odata.github.io/WebApi/#04-26-InOperator
OData v4 now supports the IN operator as a short hand for multiple or queries (as of http://docs.oasis-open.org/odata/new-in-odata/v4.01/cn01/new-in-odata-v4.01-cn01.html#_Toc485385090 ). This could help to change code such as:
var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
var stationIds = [];
for (var i = 0; i < selectedStations.length; i++) {
stationIds.push({
field: "StationId",
operator: "eq",
value: stationId
});
}
dataSource.filter({
logic: "or",
filters: stationIds
});
into a much cleaner:
var selectedStations = $("#cmbStations").data("kendoMultiSelect").dataItems();
var stationIds = [];
for (var i = 0; i < selectedStations.length; i++) {
stationIds.push(selectedStations[i].StationId);
}
dataSource.filter({
field: "StationId",
operator: "in",
value: stationId
});