BackboneJS - Collection findWhere - Backbone.js

Description

It is like the where method, but directly returns only the first model in the collection that matches the passed attributes.

Syntax

Parameters

  • attributes − They represent the property of a defined model.

Example

Output

Let us carry out the following steps to see how the above code works −

  • Save the above code in the findwhere.htm file.
  • Open this HTML file in a browser.

Output

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Backbone.js Topics