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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -