Backbone.js collection.pluck()

The backbone.js collection pluck method is used to retrieve an attribute from each model in the collection. It is equivalent to calling map and returning a single attribute from the iterator.

Syntax:


Parameter explanation:

attribute: It specifies the property of a defined model.

Let's take an example to deploy this property.

See this example:

Test it Now

Output:

Save the above code in pluck.html file and open this file in a new browser.

BackboneJS Pluck Collection



Latest Courses