![]() |
VOOZH | about |
The Backbone.js parse Collection is a method that is called by Backbone whenever a Collection's models are returned by the server. The default implementation simply passes the JSON response. We can override it with a new logic to flexibly parse the response.
Syntax:
collection.parse( response , options );
Parameters:
Example 1: In this example, we will illustrate the Backbone.js parse Collection. Here we will parse our Models when we pass them to the collection at the initiation of collection.
Output:
Example 2: In this example, we will parse the data which is coming as a result of the fetch request.