Reputation: 7123
Is there a way to use an ko.observableArray like a map/dictionary?
For example:
var arr = ko.observableArray();
arr.push('key', { '.. Some object as value ..' });
And then retrive the value using the key:
var value = arr['key'];
Upvotes: 5
Views: 7035
Reputation: 7123
Found two possible implementations:
I ended up using the observableDictionary, it is fast and simple.
Upvotes: 3