Underscore.js Collections: Where
HTML
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<a target="parent" href="http://underscorejs.org/#where">Learn More</a>
JavaScript
alert('1');
var arr = [{title: "Bad Boys III", author: "Danny Boyle", year: 2015},
{title: "The Tempest", author: "Shakespeare", year: 1611}]
var playFindWhere = _.where(arr, {author: "Shakespeare", year: 1611});
console.log(playFindWhere);
//Is the only play by Shakespeare, written in the year 1611, in this array