我有一个 observableArray,我有一个名字“Zippy”,我需要检查它是否在数组中。如果这个名字存在,我需要得到它的类型。我该怎么做?
// This observable array initially contains three objects
var anotherObservableArray = ko.observableArray([
{ name: "Bungle", type: "Bear" },
{ name: "George", type: "Hippo" },
{ name: "Zippy", type: "Unknown" }
]);