78
Backbone.js collection.parse()
The Backbone.js parse method is called whenever a model’s data is returned by a server. The collection’s data is returned by passing through the response object and data is returned in JSON format.
Syntax:
Parameter explanation:
response: It specifies the array of model attributes to the collection.
options: It represents the data in JSON format if it is set to true.
Let’s take an example to demonstrate the parse method.
See this example: