Backbone.JS Get()

The Backbone.JS Get() collection method retrieves a model from a collection by using id or Cid.

Syntax:

Backbone.Collection.Get (id )   

Parameters:
id: This parameter is used to specify the id of the model to be retrieved from the collection.

Example:

  

  
Example  
  
  
  
  
  
  
  
  

Output:

Hello World!

Explanation:
In the above example, the Y object gets the X with id = 100.