Merge/compare a boolean array with a list
Ok, so my title isn't probably the best but I wasn't sure how to describe it in a short sentence. So I've got an idea of how something needs to be done (open to being wrong) and was hoping to get some feedback as to how to structure a function. So I've got a boolean array "favorites" that looks like [false,false,true,false] and I've got a list of ice cream flavors id1=chocolate, id2=strawberry,id3=vanilla, id4=twist. In case you're wondering the framework i'm using is Ember.js but all my functions and such are JQuery.
So I've got the "Flavor" as a fixture and each flavor model is content="chocolate" and isSelected=null. Content is a string and isSelected is a boolean. "favorites" is just a boolean array. When a user looks at their profile it will show their favorites (by some how doing a "only show selected favorites"), but then when a user selected "edit favorites" it'll show a checkbox list of all flavors and the checkbox will be checked for favorites that hold a "true" status in the array.
So my question boils down to, what are some pointers as to how I go about going through the boolean array (favorites) while simultaneously walking through the corresponding number of model of flavors and applying the boolean from favorites to the boolean value "isSelected" of the flavor model? Does this make sense or am I trying too hard?