Are there associative array in ember? It doesn't appear that the Ember.MutableArray is geared towards anything other than number based indexes.
I've tried using a plain object aka.
var what = {};
what['mylocId'] = object;
But ember is not able to observe changes to the existence of properties on a plain old Javascript object.
The reason i'd like to use an associative array other than a plain array is that every object i wish to store has an ID and it would be considerably faster to structure it like a dictionary than an iterative array (or is Javascript smarter than i think about that kind of stuff).
Aucun commentaire:
Enregistrer un commentaire