The Backbone.JS FindWhere() collection method is used to get the first model that matches the specified attribute in the collection.
Syntax:
Collection.FindWhere ( attribute )
Parameters:
Example:
Example
Output:
The values of matched attribute are: {"name":"Happy","id":10}
Explanation:
In the above example, the FindWhere() method returns the first matched model for the “id: 10” in the collection.