Open thequbit opened 8 years ago
@GabeIsman I'm having a hard time figuring out how to get the actual list of returned orgs. I see that collection is used all over, but I'm having a hard time figuring out how to get to the data within that object ( specificity so I can rearrange to group by state ). I thought I had a better grip on how you had abstracted things, but I got lost in the layers, ha.
@thequbit So Backbone mixes underscore collection handling methods right into the collection. So you can do collection.groupBy('state')
and you'll get and object like { AL: [...], AK: [...],... }
. See http://backbonejs.org/docs/backbone.html#section-146.
Alternately if you want to be more explicit, collection.models
is just the array of model objects.
This is the action that came out of #177 .