It would be exponentially helpful if the "ObservableArray" implemented some basic "Where/Select/Single" methods. This would assist in searching through them and give Kendo UI a much needed facelift in the array department.
Behavior would be, theoretically, as follows...
var viewModel = kendo.observable({
Users: [
{
id: 1,
name: "Stacey"
},
{
id: 2,
name: "Dylan"
},
{
id: 3,
name: "John"
}
]
});
var idSearch = 1;
var result = kendo.Search(viewModelArray).Where(function(x) { return x.id == idSearch });
or ...
var result = kendo.Search(viewModelArray)
.Single(function(x) { return x.id == idSearch });
or possibly even chained like in "linqjs"
var result = kendo.Search(viewModelArray)
.Where(function(x) { return x.id == idSearch })
.Single();