javascript - backbone collection get list of single attributes -
I want to get a list from my collection, the list will be selected to add an option to the selection list. I want to use it to store it, for example, for example, I want to filter my collection with group attributes, first I need to get all the different groups from my collection, i.e. no repetition No, I know that I can do something like this,
this.collection.where ({group: "group name"});
But there is no way to return a list of properties of the model in an archive without asking a key word?
What I want in the end, is something like this,
Is this also possible?
I think you need it chess ()
with < Code> _ Uniq () :
_. Uniq (this.collection.pluck ('group'))
Comments
Post a Comment