Where filtering in backbone

Was doing some filtering on a collection and came across a problem where I wanted to have a variable as the key in ‘where’ but it wouldn’t take and I wasn’t sure why. Stack Overflow to the rescue! http://stackoverflow.com/questions/27732629/backbonejs-variable-in-a-where-filter-key/27732713 So it turns out that it doesn’t work because the key “prop” is always interpreted literally, as a string (and no property in my collection is ‘prop’). So to get around it you use something like this instead of using what I was originally doing: